Security Configuration Assessment Report

for controlplane

  • Target IP Address: 10.244.0.0

CIS Ubuntu Linux 20.04 LTS Benchmark v2.0.1

  • Level 1 - Server
  • Sunday, April 14 2024 23:44:57
  • Assessment Duration: 1 minute, 26 seconds

Report generated by the Center for Internet Security's Configuration Assessment Tool (CIS-CAT Pro Assessor) v4.38.0.

For further information, please visit The Center for Internet Security or our Product Support page.

Copyright ©2024, The Center for Internet Security

Content generated on 04/14/2024 23:46 PM. Content last obtained on 01/25/2024 15:50 PM.

Summary

Description Tests Scoring
Pass Fail Error Unkn. Man. Exc. Score Max Percent
1 Initial Setup 37 18 0 0 3 0 37.0 55.0 67%
1.1 Filesystem Configuration 20 7 0 0 0 0 20.0 27.0 74%
1.1.1 Disable unused filesystems 0 5 0 0 0 0 0.0 5.0 0%
1.1.2 Configure /tmp 3 1 0 0 0 0 3.0 4.0 75%
1.1.3 Configure /var 2 0 0 0 0 0 2.0 2.0 100%
1.1.4 Configure /var/tmp 3 0 0 0 0 0 3.0 3.0 100%
1.1.5 Configure /var/log 3 0 0 0 0 0 3.0 3.0 100%
1.1.6 Configure /var/log/audit 3 0 0 0 0 0 3.0 3.0 100%
1.1.7 Configure /home 2 0 0 0 0 0 2.0 2.0 100%
1.1.8 Configure /dev/shm 3 0 0 0 0 0 3.0 3.0 100%
1.2 Filesystem Integrity Checking 0 2 0 0 0 0 0.0 2.0 0%
1.3 Configure Software and Patch Management 0 0 0 0 3 0 0.0 0.0 0%
1.4 Secure Boot Settings 1 2 0 0 0 0 1.0 3.0 33%
1.5 Additional Process Hardening 3 2 0 0 0 0 3.0 5.0 60%
1.6 Mandatory Access Control 0 3 0 0 0 0 0.0 3.0 0%
1.6.1 Configure AppArmor 0 3 0 0 0 0 0.0 3.0 0%
1.7 Command Line Warning Banners 4 2 0 0 0 0 4.0 6.0 67%
1.8 GNOME Display Manager 9 0 0 0 0 0 9.0 9.0 100%
2 Services 26 3 0 0 4 0 26.0 29.0 90%
2.1 Configure Time Synchronization 6 1 0 0 3 0 6.0 7.0 86%
2.1.1 Ensure time synchronization is in use 1 0 0 0 0 0 1.0 1.0 100%
2.1.2 Configure chrony 2 0 0 0 1 0 2.0 2.0 100%
2.1.3 Configure systemd-timesyncd 0 1 0 0 1 0 0.0 1.0 0%
2.1.4 Configure ntp 3 0 0 0 1 0 3.0 3.0 100%
2.2 Special Purpose Services 15 1 0 0 0 0 15.0 16.0 94%
2.3 Service Clients 5 1 0 0 0 0 5.0 6.0 83%
3 Network Configuration 7 29 0 0 6 0 7.0 36.0 19%
3.1 Disable unused network protocols and devices 2 0 0 0 1 0 2.0 2.0 100%
3.2 Network Parameters (Host Only) 0 2 0 0 0 0 0.0 2.0 0%
3.3 Network Parameters (Host and Router) 0 9 0 0 0 0 0.0 9.0 0%
3.4 Firewall Configuration 5 18 0 0 5 0 5.0 23.0 22%
3.4.1 Configure UncomplicatedFirewall 1 5 0 0 1 0 1.0 6.0 17%
3.4.2 Configure nftables 1 7 0 0 2 0 1.0 8.0 12%
3.4.3 Configure iptables 3 6 0 0 2 0 3.0 9.0 33%
3.4.3.1 Configure iptables software 2 1 0 0 0 0 2.0 3.0 67%
3.4.3.2 Configure IPv4 iptables 0 3 0 0 1 0 0.0 3.0 0%
3.4.3.3 Configure IPv6 ip6tables 1 2 0 0 1 0 1.0 3.0 33%
4 Access, Authentication and Authorization 23 28 0 0 1 0 23.0 51.0 45%
4.1 Configure time-based job schedulers 2 7 0 0 0 0 2.0 9.0 22%
4.2 Configure SSH Server 13 7 0 0 0 0 13.0 20.0 65%
4.3 Configure privilege escalation 3 3 0 0 0 0 3.0 6.0 50%
4.4 Configure PAM 1 3 0 0 1 0 1.0 4.0 25%
4.5 User Accounts and Environment 4 8 0 0 0 0 4.0 12.0 33%
4.5.1 Set Shadow Password Suite Parameters 2 5 0 0 0 0 2.0 7.0 29%
5 Logging and Auditing 4 7 0 0 8 0 4.0 11.0 36%
5.1 Configure Logging 4 6 0 0 8 0 4.0 10.0 40%
5.1.1 Configure journald 2 3 0 0 5 0 2.0 5.0 40%
5.1.1.1 Ensure journald is configured to send logs to a remote log host 1 1 0 0 2 0 1.0 2.0 50%
5.1.2 Configure rsyslog 1 3 0 0 3 0 1.0 4.0 25%
5.2 Configure System Accounting (auditd) 0 1 0 0 0 0 0.0 1.0 0%
5.2.1 Ensure auditing is enabled 0 0 0 0 0 0 0.0 0.0 0%
5.2.2 Configure Data Retention 0 0 0 0 0 0 0.0 0.0 0%
5.2.3 Configure auditd rules 0 0 0 0 0 0 0.0 0.0 0%
5.2.4 Configure auditd file access 0 1 0 0 0 0 0.0 1.0 0%
6 System Maintenance 19 5 0 0 1 0 19.0 24.0 79%
6.1 System File Permissions 9 3 0 0 1 0 9.0 12.0 75%
6.2 Local User and Group Settings 10 2 0 0 0 0 10.0 12.0 83%
Total 116 90 0 0 23 0 116.0 206.0 56%

Note: Actual scores are subject to rounding errors. The sum of these values may not result in the exact overall score.

The 'Exc' column only applies to Exceptions that are generated using CIS-CAT Pro Dashboard and is not utilized by CIS-CAT Pro Assessor.

Profiles

This benchmark contains 4 profiles.The Level 1 - Server profile was used for this assessment.

Title Description
Level 1 - Server

Items in this profile intend to:

  • be practical and prudent;
  • provide a clear security benefit; and
  • not inhibit the utility of the technology beyond acceptable means.

This profile is intended for servers.

Show Profile XML
<xccdf:Profile xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
               xmlns="http://checklists.nist.gov/xccdf/1.2"
               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
               xmlns:notes="http://benchmarks.cisecurity.org/notes"
               xmlns:xhtml="http://www.w3.org/1999/xhtml"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:sce="http://open-scap.org/page/SCE_xccdf_stream"
               xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog"
               xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2"
               xmlns:xlink="http://www.w3.org/1999/xlink"
               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
               id="xccdf_org.cisecurity.benchmarks_profile_Level_1_-_Server">
   <xccdf:title xml:lang="en">Level 1 - Server</xccdf:title>
   <xccdf:description xml:lang="en">
      <xhtml:p>Items in this profile intend to:</xhtml:p>
      <xhtml:ul>
         <xhtml:li>be practical and prudent;</xhtml:li>
         <xhtml:li>provide a clear security benefit; and</xhtml:li>
         <xhtml:li>not inhibit the utility of the technology beyond acceptable means.</xhtml:li>
      </xhtml:ul>
      <xhtml:p>This profile is intended for servers.</xhtml:p>
   </xccdf:description>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.1.1_Ensure_mounting_of_cramfs_filesystems_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.1.2_Ensure_mounting_of_freevxfs_filesystems_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.1.3_Ensure_mounting_of_jffs2_filesystems_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.1.4_Ensure_mounting_of_hfs_filesystems_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.1.5_Ensure_mounting_of_hfsplus_filesystems_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.2.1_Ensure_tmp_is_a_separate_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.2.2_Ensure_nodev_option_set_on_tmp_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.2.3_Ensure_noexec_option_set_on_tmp_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.2.4_Ensure_nosuid_option_set_on_tmp_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.3.2_Ensure_nodev_option_set_on_var_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.3.3_Ensure_nosuid_option_set_on_var_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.4.2_Ensure_nodev_option_set_on_vartmp_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.4.3_Ensure_noexec_option_set_on_vartmp_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.4.4_Ensure_nosuid_option_set_on_vartmp_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.5.2_Ensure_nodev_option_set_on_varlog_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.5.3_Ensure_noexec_option_set_on_varlog_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.5.4_Ensure_nosuid_option_set_on_varlog_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.6.2_Ensure_nodev_option_set_on_varlogaudit_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.6.3_Ensure_noexec_option_set_on_varlogaudit_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.6.4_Ensure_nosuid_option_set_on_varlogaudit_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.7.2_Ensure_nodev_option_set_on_home_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.7.3_Ensure_nosuid_option_set_on_home_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.8.1_Ensure_nodev_option_set_on_devshm_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.8.2_Ensure_noexec_option_set_on_devshm_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.8.3_Ensure_nosuid_option_set_on_devshm_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.9_Disable_Automounting"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.10_Disable_USB_Storage"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.2.1_Ensure_AIDE_is_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.2.2_Ensure_filesystem_integrity_is_regularly_checked"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.3.1_Ensure_updates_patches_and_additional_security_software_are_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.3.2_Ensure_package_manager_repositories_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.3.3_Ensure_GPG_keys_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.4.1_Ensure_bootloader_password_is_set"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.4.2_Ensure_permissions_on_bootloader_config_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.4.3_Ensure_authentication_required_for_single_user_mode"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.5.1_Ensure_prelink_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.5.2_Ensure_address_space_layout_randomization_ASLR_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.5.3_Ensure_ptrace_scope_is_restricted"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.5.4_Ensure_Automatic_Error_Reporting_is_not_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.5.5_Ensure_core_dumps_are_restricted"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.6.1.1_Ensure_AppArmor_is_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.6.1.2_Ensure_AppArmor_is_enabled_in_the_bootloader_configuration"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.6.1.3_Ensure_all_AppArmor_Profiles_are_in_enforce_or_complain_mode"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.7.1_Ensure_message_of_the_day_is_configured_properly"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.7.2_Ensure_local_login_warning_banner_is_configured_properly"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.7.3_Ensure_remote_login_warning_banner_is_configured_properly"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.7.4_Ensure_permissions_on_etcmotd_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.7.5_Ensure_permissions_on_etcissue_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.7.6_Ensure_permissions_on_etcissue.net_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.8.2_Ensure_GDM_login_banner_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.8.3_Ensure_GDM_disable-user-list_option_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.8.4_Ensure_GDM_screen_locks_when_the_user_is_idle"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.8.5_Ensure_GDM_screen_locks_cannot_be_overridden"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.8.6_Ensure_GDM_automatic_mounting_of_removable_media_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.8.7_Ensure_GDM_disabling_automatic_mounting_of_removable_media_is_not_overridden"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.8.8_Ensure_GDM_autorun-never_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.8.9_Ensure_GDM_autorun-never_is_not_overridden"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.8.10_Ensure_XDCMP_is_not_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.1.1_Ensure_a_single_time_synchronization_daemon_is_in_use"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.2.1_Ensure_chrony_is_configured_with_authorized_timeserver"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.2.2_Ensure_chrony_is_running_as_user__chrony"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.2.3_Ensure_chrony_is_enabled_and_running"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.3.1_Ensure_systemd-timesyncd_configured_with_authorized_timeserver"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.3.2_Ensure_systemd-timesyncd_is_enabled_and_running"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.4.1_Ensure_ntp_access_control_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.4.2_Ensure_ntp_is_configured_with_authorized_timeserver"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.4.3_Ensure_ntp_is_running_as_user_ntp"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.4.4_Ensure_ntp_is_enabled_and_running"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.2_Ensure_Avahi_Server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.3_Ensure_CUPS_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.4_Ensure_DHCP_Server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.5_Ensure_LDAP_server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.6_Ensure_NFS_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.7_Ensure_DNS_Server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.8_Ensure_FTP_Server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.9_Ensure_HTTP_server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.10_Ensure_IMAP_and_POP3_server_are_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.11_Ensure_Samba_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.12_Ensure_HTTP_Proxy_Server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.13_Ensure_SNMP_Server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.14_Ensure_NIS_Server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.15_Ensure_dnsmasq_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.16_Ensure_mail_transfer_agent_is_configured_for_local-only_mode"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.17_Ensure_rsync_service_is_either_not_installed_or_is_masked"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.3.1_Ensure_NIS_Client_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.3.2_Ensure_rsh_client_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.3.3_Ensure_talk_client_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.3.4_Ensure_telnet_client_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.3.5_Ensure_LDAP_client_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.3.6_Ensure__RPC_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.4_Ensure_nonessential_services_are_removed_or_masked"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.1.1_Ensure_IPv6_status_is_identified"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.1.2_Ensure_wireless_interfaces_are_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.1.3_Ensure_bluetooth_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.2.1_Ensure_packet_redirect_sending_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.2.2_Ensure_IP_forwarding_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.1_Ensure_source_routed_packets_are_not_accepted"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.2_Ensure_ICMP_redirects_are_not_accepted"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.3_Ensure_secure_ICMP_redirects_are_not_accepted"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.4_Ensure_suspicious_packets_are_logged"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.5_Ensure_broadcast_ICMP_requests_are_ignored"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.6_Ensure_bogus_ICMP_responses_are_ignored"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.7_Ensure_Reverse_Path_Filtering_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.8_Ensure_TCP_SYN_Cookies_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.9_Ensure_IPv6_router_advertisements_are_not_accepted"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.1.1_Ensure_ufw_is_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.1.2_Ensure_iptables-persistent_is_not_installed_with_ufw"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.1.3_Ensure_ufw_service_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.1.4_Ensure_ufw_loopback_traffic_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.1.5_Ensure_ufw_outbound_connections_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.1.6_Ensure_ufw_firewall_rules_exist_for_all_open_ports"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.1.7_Ensure_ufw_default_deny_firewall_policy"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.1_Ensure_nftables_is_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.2_Ensure_ufw_is_uninstalled_or_disabled_with_nftables"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.3_Ensure_iptables_are_flushed_with_nftables"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.4_Ensure_a_nftables_table_exists"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.5_Ensure_nftables_base_chains_exist"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.6_Ensure_nftables_loopback_traffic_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.7_Ensure_nftables_outbound_and_established_connections_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.8_Ensure_nftables_default_deny_firewall_policy"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.9_Ensure_nftables_service_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.10_Ensure_nftables_rules_are_permanent"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.1.1_Ensure_iptables_packages_are_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.1.2_Ensure_nftables_is_not_installed_with_iptables"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.1.3_Ensure_ufw_is_uninstalled_or_disabled_with_iptables"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.2.1_Ensure_iptables_default_deny_firewall_policy"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.2.2_Ensure_iptables_loopback_traffic_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.2.3_Ensure_iptables_outbound_and_established_connections_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.2.4_Ensure_iptables_firewall_rules_exist_for_all_open_ports"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.3.1_Ensure_ip6tables_default_deny_firewall_policy"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.3.2_Ensure_ip6tables_loopback_traffic_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.3.3_Ensure_ip6tables_outbound_and_established_connections_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.3.4_Ensure_ip6tables_firewall_rules_exist_for_all_open_ports"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.1_Ensure_cron_daemon_is_enabled_and_active"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.2_Ensure_permissions_on_etccrontab_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.3_Ensure_permissions_on_etccron.hourly_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.4_Ensure_permissions_on_etccron.daily_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.5_Ensure_permissions_on_etccron.weekly_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.6_Ensure_permissions_on_etccron.monthly_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.7_Ensure_permissions_on_etccron.d_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.8_Ensure_cron_is_restricted_to_authorized_users"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.9_Ensure_at_is_restricted_to_authorized_users"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.1_Ensure_permissions_on_etcsshsshd_config_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.2_Ensure_permissions_on_SSH_private_host_key_files_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.3_Ensure_permissions_on_SSH_public_host_key_files_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.4_Ensure_SSH_access_is_limited"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.5_Ensure_SSH_LogLevel_is_appropriate"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.6_Ensure_SSH_PAM_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.7_Ensure_SSH_root_login_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.8_Ensure_SSH_HostbasedAuthentication_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.9_Ensure_SSH_PermitEmptyPasswords_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.10_Ensure_SSH_PermitUserEnvironment_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.11_Ensure_SSH_IgnoreRhosts_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.13_Ensure_only_strong_Ciphers_are_used"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.14_Ensure_only_strong_MAC_algorithms_are_used"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.15_Ensure_only_strong_Key_Exchange_algorithms_are_used"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.17_Ensure_SSH_warning_banner_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.18_Ensure_SSH_MaxAuthTries_is_set_to_4_or_less"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.19_Ensure_SSH_MaxStartups_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.20_Ensure_SSH_LoginGraceTime_is_set_to_one_minute_or_less"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.21_Ensure_SSH_MaxSessions_is_set_to_10_or_less"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.22_Ensure_SSH_Idle_Timeout_Interval_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.3.1_Ensure_sudo_is_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.3.2_Ensure_sudo_commands_use_pty"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.3.3_Ensure_sudo_log_file_exists"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.3.5_Ensure_re-authentication_for_privilege_escalation_is_not_disabled_globally"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.3.6_Ensure_sudo_authentication_timeout_is_configured_correctly"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.3.7_Ensure_access_to_the_su_command_is_restricted"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.4.1_Ensure_password_creation_requirements_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.4.2_Ensure_lockout_for_failed_password_attempts_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.4.3_Ensure_password_reuse_is_limited"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.4.4_Ensure_strong_password_hashing_algorithm_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.4.5_Ensure_all_current_passwords_uses_the_configured_hashing_algorithm"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.1.1_Ensure_minimum_days_between_password_changes_is__configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.1.2_Ensure_password_expiration_is_365_days_or_less"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.1.3_Ensure_password_expiration_warning_days_is_7_or_more"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.1.4_Ensure_inactive_password_lock_is_30_days_or_less"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.1.5_Ensure_all_users_last_password_change_date_is_in_the_past"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.1.6_Ensure_the_number_of_changed_characters_in_a_new_password_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.1.7_Ensure_preventing_the_use_of_dictionary_words_for_passwords_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.2_Ensure_system_accounts_are_secured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.3_Ensure_default_group_for_the_root_account_is_GID_0"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.4_Ensure_default_user_umask_is_027_or_more_restrictive"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.5_Ensure_default_user_shell_timeout_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.7_Ensure_maximum_number_of_same_consecutive_characters_in_a_password_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.1.1_Ensure_systemd-journal-remote_is_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.1.2_Ensure_systemd-journal-remote_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.1.3_Ensure_systemd-journal-remote_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.1.4_Ensure_journald_is_not_configured_to_receive_logs_from_a_remote_client"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.2_Ensure_journald_service_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.3_Ensure_journald_is_configured_to_compress_large_log_files"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.4_Ensure_journald_is_configured_to_write_logfiles_to_persistent_disk"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.5_Ensure_journald_is_not_configured_to_send_logs_to_rsyslog"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.6_Ensure_journald_log_rotation_is_configured_per_site_policy"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.7_Ensure_journald_default_file_permissions_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.2.1_Ensure_rsyslog_is_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.2.2_Ensure_rsyslog_service_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.2.3_Ensure_journald_is_configured_to_send_logs_to_rsyslog"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.2.4_Ensure_rsyslog_default_file_permissions_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.2.5_Ensure_logging_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.2.6_Ensure_rsyslog_is_configured_to_send_logs_to_a_remote_log_host"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.2.7_Ensure_rsyslog_is_not_configured_to_receive_logs_from_a_remote_client"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.3_Ensure_all_logfiles_have_appropriate_access_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.4.11_Ensure_cryptographic_mechanisms_are_used_to_protect_the_integrity_of_audit_tools"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.1_Ensure_permissions_on_etcpasswd_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.2_Ensure_permissions_on_etcpasswd-_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.3_Ensure_permissions_on_etcgroup_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.4_Ensure_permissions_on_etcgroup-_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.5_Ensure_permissions_on_etcshadow_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.6_Ensure_permissions_on_etcshadow-_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.7_Ensure_permissions_on_etcgshadow_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.8_Ensure_permissions_on_etcgshadow-_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.9_Ensure_permissions_on_etcshells_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.10_Ensure_permissions_on_etcopasswd_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.11_Ensure_world_writable_files_and_directories_are_secured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.12_Ensure_no_unowned_or_ungrouped_files_or_directories_exist"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.13_Ensure_SUID_and_SGID_files_are_reviewed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.1_Ensure_accounts_in_etcpasswd_use_shadowed_passwords"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.2_Ensure_etcshadow_password_fields_are_not_empty"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.3_Ensure_all_groups_in_etcpasswd_exist_in_etcgroup"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.4_Ensure_shadow_group_is_empty"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.5_Ensure_no_duplicate_UIDs_exist"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.6_Ensure_no_duplicate_GIDs_exist"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.7_Ensure_no_duplicate_user_names_exist"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.8_Ensure_no_duplicate_group_names_exist"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.9_Ensure_root_PATH_Integrity"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.10_Ensure_root_is_the_only_UID_0_account"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.11_Ensure_local_interactive_user_home_directories_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.12_Ensure_local_interactive_user_dot_files_access_is_configured"
                 selected="true"/>
</xccdf:Profile>
Level 2 - Server

This profile extends the "Level 1 - Server" profile. Items in this profile exhibit one or more of the following characteristics:

  • are intended for environments or use cases where security is paramount.
  • acts as defense in depth measure.
  • may negatively inhibit the utility or performance of the technology.

This profile is intended for servers.

Show Profile XML
<xccdf:Profile xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
               xmlns="http://checklists.nist.gov/xccdf/1.2"
               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
               xmlns:notes="http://benchmarks.cisecurity.org/notes"
               xmlns:xhtml="http://www.w3.org/1999/xhtml"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:sce="http://open-scap.org/page/SCE_xccdf_stream"
               xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog"
               xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2"
               xmlns:xlink="http://www.w3.org/1999/xlink"
               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
               id="xccdf_org.cisecurity.benchmarks_profile_Level_2_-_Server">
   <xccdf:title xml:lang="en">Level 2 - Server</xccdf:title>
   <xccdf:description xml:lang="en">
      <xhtml:p>This profile extends the "Level 1 - Server" profile. Items in this profile exhibit one or more of the following characteristics:</xhtml:p>
      <xhtml:ul>
         <xhtml:li>are intended for environments or use cases where security is paramount.</xhtml:li>
         <xhtml:li>acts as defense in depth measure.</xhtml:li>
         <xhtml:li>may negatively inhibit the utility or performance of the technology.</xhtml:li>
      </xhtml:ul>
      <xhtml:p>This profile is intended for servers.</xhtml:p>
   </xccdf:description>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.1.1_Ensure_mounting_of_cramfs_filesystems_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.1.2_Ensure_mounting_of_freevxfs_filesystems_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.1.3_Ensure_mounting_of_jffs2_filesystems_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.1.4_Ensure_mounting_of_hfs_filesystems_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.1.5_Ensure_mounting_of_hfsplus_filesystems_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.1.6_Ensure_mounting_of_squashfs_filesystems_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.1.7_Ensure_mounting_of_udf_filesystems_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.2.1_Ensure_tmp_is_a_separate_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.2.2_Ensure_nodev_option_set_on_tmp_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.2.3_Ensure_noexec_option_set_on_tmp_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.2.4_Ensure_nosuid_option_set_on_tmp_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.3.1_Ensure_separate_partition_exists_for_var"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.3.2_Ensure_nodev_option_set_on_var_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.3.3_Ensure_nosuid_option_set_on_var_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.4.1_Ensure_separate_partition_exists_for_vartmp"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.4.2_Ensure_nodev_option_set_on_vartmp_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.4.3_Ensure_noexec_option_set_on_vartmp_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.4.4_Ensure_nosuid_option_set_on_vartmp_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.5.1_Ensure_separate_partition_exists_for_varlog"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.5.2_Ensure_nodev_option_set_on_varlog_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.5.3_Ensure_noexec_option_set_on_varlog_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.5.4_Ensure_nosuid_option_set_on_varlog_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.6.1_Ensure_separate_partition_exists_for_varlogaudit"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.6.2_Ensure_nodev_option_set_on_varlogaudit_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.6.3_Ensure_noexec_option_set_on_varlogaudit_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.6.4_Ensure_nosuid_option_set_on_varlogaudit_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.7.1_Ensure_separate_partition_exists_for_home"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.7.2_Ensure_nodev_option_set_on_home_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.7.3_Ensure_nosuid_option_set_on_home_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.8.1_Ensure_nodev_option_set_on_devshm_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.8.2_Ensure_noexec_option_set_on_devshm_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.8.3_Ensure_nosuid_option_set_on_devshm_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.9_Disable_Automounting"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.10_Disable_USB_Storage"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.2.1_Ensure_AIDE_is_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.2.2_Ensure_filesystem_integrity_is_regularly_checked"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.3.1_Ensure_updates_patches_and_additional_security_software_are_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.3.2_Ensure_package_manager_repositories_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.3.3_Ensure_GPG_keys_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.4.1_Ensure_bootloader_password_is_set"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.4.2_Ensure_permissions_on_bootloader_config_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.4.3_Ensure_authentication_required_for_single_user_mode"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.5.1_Ensure_prelink_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.5.2_Ensure_address_space_layout_randomization_ASLR_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.5.3_Ensure_ptrace_scope_is_restricted"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.5.4_Ensure_Automatic_Error_Reporting_is_not_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.5.5_Ensure_core_dumps_are_restricted"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.6.1.1_Ensure_AppArmor_is_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.6.1.2_Ensure_AppArmor_is_enabled_in_the_bootloader_configuration"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.6.1.3_Ensure_all_AppArmor_Profiles_are_in_enforce_or_complain_mode"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.6.1.4_Ensure_all_AppArmor_Profiles_are_enforcing"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.7.1_Ensure_message_of_the_day_is_configured_properly"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.7.2_Ensure_local_login_warning_banner_is_configured_properly"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.7.3_Ensure_remote_login_warning_banner_is_configured_properly"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.7.4_Ensure_permissions_on_etcmotd_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.7.5_Ensure_permissions_on_etcissue_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.7.6_Ensure_permissions_on_etcissue.net_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.8.1_Ensure_GNOME_Display_Manager_is_removed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.8.2_Ensure_GDM_login_banner_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.8.3_Ensure_GDM_disable-user-list_option_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.8.4_Ensure_GDM_screen_locks_when_the_user_is_idle"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.8.5_Ensure_GDM_screen_locks_cannot_be_overridden"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.8.6_Ensure_GDM_automatic_mounting_of_removable_media_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.8.7_Ensure_GDM_disabling_automatic_mounting_of_removable_media_is_not_overridden"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.8.8_Ensure_GDM_autorun-never_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.8.9_Ensure_GDM_autorun-never_is_not_overridden"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.8.10_Ensure_XDCMP_is_not_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.1.1_Ensure_a_single_time_synchronization_daemon_is_in_use"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.2.1_Ensure_chrony_is_configured_with_authorized_timeserver"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.2.2_Ensure_chrony_is_running_as_user__chrony"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.2.3_Ensure_chrony_is_enabled_and_running"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.3.1_Ensure_systemd-timesyncd_configured_with_authorized_timeserver"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.3.2_Ensure_systemd-timesyncd_is_enabled_and_running"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.4.1_Ensure_ntp_access_control_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.4.2_Ensure_ntp_is_configured_with_authorized_timeserver"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.4.3_Ensure_ntp_is_running_as_user_ntp"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.4.4_Ensure_ntp_is_enabled_and_running"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.1_Ensure_X_Window_System_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.2_Ensure_Avahi_Server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.3_Ensure_CUPS_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.4_Ensure_DHCP_Server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.5_Ensure_LDAP_server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.6_Ensure_NFS_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.7_Ensure_DNS_Server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.8_Ensure_FTP_Server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.9_Ensure_HTTP_server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.10_Ensure_IMAP_and_POP3_server_are_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.11_Ensure_Samba_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.12_Ensure_HTTP_Proxy_Server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.13_Ensure_SNMP_Server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.14_Ensure_NIS_Server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.15_Ensure_dnsmasq_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.16_Ensure_mail_transfer_agent_is_configured_for_local-only_mode"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.17_Ensure_rsync_service_is_either_not_installed_or_is_masked"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.3.1_Ensure_NIS_Client_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.3.2_Ensure_rsh_client_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.3.3_Ensure_talk_client_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.3.4_Ensure_telnet_client_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.3.5_Ensure_LDAP_client_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.3.6_Ensure__RPC_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.4_Ensure_nonessential_services_are_removed_or_masked"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.1.1_Ensure_IPv6_status_is_identified"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.1.2_Ensure_wireless_interfaces_are_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.1.3_Ensure_bluetooth_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.1.4_Ensure_DCCP_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.1.5_Ensure_SCTP_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.1.6_Ensure_RDS_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.1.7_Ensure_TIPC_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.2.1_Ensure_packet_redirect_sending_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.2.2_Ensure_IP_forwarding_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.1_Ensure_source_routed_packets_are_not_accepted"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.2_Ensure_ICMP_redirects_are_not_accepted"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.3_Ensure_secure_ICMP_redirects_are_not_accepted"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.4_Ensure_suspicious_packets_are_logged"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.5_Ensure_broadcast_ICMP_requests_are_ignored"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.6_Ensure_bogus_ICMP_responses_are_ignored"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.7_Ensure_Reverse_Path_Filtering_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.8_Ensure_TCP_SYN_Cookies_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.9_Ensure_IPv6_router_advertisements_are_not_accepted"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.1.1_Ensure_ufw_is_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.1.2_Ensure_iptables-persistent_is_not_installed_with_ufw"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.1.3_Ensure_ufw_service_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.1.4_Ensure_ufw_loopback_traffic_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.1.5_Ensure_ufw_outbound_connections_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.1.6_Ensure_ufw_firewall_rules_exist_for_all_open_ports"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.1.7_Ensure_ufw_default_deny_firewall_policy"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.1_Ensure_nftables_is_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.2_Ensure_ufw_is_uninstalled_or_disabled_with_nftables"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.3_Ensure_iptables_are_flushed_with_nftables"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.4_Ensure_a_nftables_table_exists"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.5_Ensure_nftables_base_chains_exist"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.6_Ensure_nftables_loopback_traffic_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.7_Ensure_nftables_outbound_and_established_connections_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.8_Ensure_nftables_default_deny_firewall_policy"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.9_Ensure_nftables_service_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.10_Ensure_nftables_rules_are_permanent"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.1.1_Ensure_iptables_packages_are_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.1.2_Ensure_nftables_is_not_installed_with_iptables"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.1.3_Ensure_ufw_is_uninstalled_or_disabled_with_iptables"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.2.1_Ensure_iptables_default_deny_firewall_policy"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.2.2_Ensure_iptables_loopback_traffic_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.2.3_Ensure_iptables_outbound_and_established_connections_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.2.4_Ensure_iptables_firewall_rules_exist_for_all_open_ports"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.3.1_Ensure_ip6tables_default_deny_firewall_policy"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.3.2_Ensure_ip6tables_loopback_traffic_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.3.3_Ensure_ip6tables_outbound_and_established_connections_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.3.4_Ensure_ip6tables_firewall_rules_exist_for_all_open_ports"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.1_Ensure_cron_daemon_is_enabled_and_active"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.2_Ensure_permissions_on_etccrontab_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.3_Ensure_permissions_on_etccron.hourly_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.4_Ensure_permissions_on_etccron.daily_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.5_Ensure_permissions_on_etccron.weekly_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.6_Ensure_permissions_on_etccron.monthly_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.7_Ensure_permissions_on_etccron.d_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.8_Ensure_cron_is_restricted_to_authorized_users"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.9_Ensure_at_is_restricted_to_authorized_users"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.1_Ensure_permissions_on_etcsshsshd_config_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.2_Ensure_permissions_on_SSH_private_host_key_files_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.3_Ensure_permissions_on_SSH_public_host_key_files_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.4_Ensure_SSH_access_is_limited"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.5_Ensure_SSH_LogLevel_is_appropriate"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.6_Ensure_SSH_PAM_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.7_Ensure_SSH_root_login_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.8_Ensure_SSH_HostbasedAuthentication_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.9_Ensure_SSH_PermitEmptyPasswords_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.10_Ensure_SSH_PermitUserEnvironment_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.11_Ensure_SSH_IgnoreRhosts_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.12_Ensure_SSH_X11_forwarding_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.13_Ensure_only_strong_Ciphers_are_used"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.14_Ensure_only_strong_MAC_algorithms_are_used"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.15_Ensure_only_strong_Key_Exchange_algorithms_are_used"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.16_Ensure_SSH_AllowTcpForwarding_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.17_Ensure_SSH_warning_banner_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.18_Ensure_SSH_MaxAuthTries_is_set_to_4_or_less"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.19_Ensure_SSH_MaxStartups_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.20_Ensure_SSH_LoginGraceTime_is_set_to_one_minute_or_less"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.21_Ensure_SSH_MaxSessions_is_set_to_10_or_less"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.22_Ensure_SSH_Idle_Timeout_Interval_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.3.1_Ensure_sudo_is_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.3.2_Ensure_sudo_commands_use_pty"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.3.3_Ensure_sudo_log_file_exists"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.3.4_Ensure_users_must_provide_password_for_privilege_escalation"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.3.5_Ensure_re-authentication_for_privilege_escalation_is_not_disabled_globally"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.3.6_Ensure_sudo_authentication_timeout_is_configured_correctly"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.3.7_Ensure_access_to_the_su_command_is_restricted"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.4.1_Ensure_password_creation_requirements_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.4.2_Ensure_lockout_for_failed_password_attempts_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.4.3_Ensure_password_reuse_is_limited"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.4.4_Ensure_strong_password_hashing_algorithm_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.4.5_Ensure_all_current_passwords_uses_the_configured_hashing_algorithm"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.1.1_Ensure_minimum_days_between_password_changes_is__configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.1.2_Ensure_password_expiration_is_365_days_or_less"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.1.3_Ensure_password_expiration_warning_days_is_7_or_more"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.1.4_Ensure_inactive_password_lock_is_30_days_or_less"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.1.5_Ensure_all_users_last_password_change_date_is_in_the_past"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.1.6_Ensure_the_number_of_changed_characters_in_a_new_password_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.1.7_Ensure_preventing_the_use_of_dictionary_words_for_passwords_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.2_Ensure_system_accounts_are_secured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.3_Ensure_default_group_for_the_root_account_is_GID_0"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.4_Ensure_default_user_umask_is_027_or_more_restrictive"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.5_Ensure_default_user_shell_timeout_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.6_Ensure_nologin_is_not_listed_in_etcshells"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.7_Ensure_maximum_number_of_same_consecutive_characters_in_a_password_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.1.1_Ensure_systemd-journal-remote_is_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.1.2_Ensure_systemd-journal-remote_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.1.3_Ensure_systemd-journal-remote_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.1.4_Ensure_journald_is_not_configured_to_receive_logs_from_a_remote_client"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.2_Ensure_journald_service_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.3_Ensure_journald_is_configured_to_compress_large_log_files"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.4_Ensure_journald_is_configured_to_write_logfiles_to_persistent_disk"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.5_Ensure_journald_is_not_configured_to_send_logs_to_rsyslog"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.6_Ensure_journald_log_rotation_is_configured_per_site_policy"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.7_Ensure_journald_default_file_permissions_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.2.1_Ensure_rsyslog_is_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.2.2_Ensure_rsyslog_service_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.2.3_Ensure_journald_is_configured_to_send_logs_to_rsyslog"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.2.4_Ensure_rsyslog_default_file_permissions_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.2.5_Ensure_logging_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.2.6_Ensure_rsyslog_is_configured_to_send_logs_to_a_remote_log_host"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.2.7_Ensure_rsyslog_is_not_configured_to_receive_logs_from_a_remote_client"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.3_Ensure_all_logfiles_have_appropriate_access_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.1.1_Ensure_auditd_is_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.1.2_Ensure_auditd_service_is_enabled_and_active"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.1.3_Ensure_auditing_for_processes_that_start_prior_to_auditd_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.1.4_Ensure_audit_backlog_limit_is_sufficient"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.2.1_Ensure_audit_log_storage_size_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.2.2_Ensure_audit_logs_are_not_automatically_deleted"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.2.3_Ensure_system_is_disabled_when_audit_logs_are_full"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.1_Ensure_changes_to_system_administration_scope_sudoers_is_collected"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.2_Ensure_actions_as_another_user_are_always_logged"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.3_Ensure_events_that_modify_the_sudo_log_file_are_collected"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.4_Ensure_events_that_modify_date_and_time_information_are_collected"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.5_Ensure_events_that_modify_the_systems_network_environment_are_collected"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.6_Ensure_use_of_privileged_commands_are_collected"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.7_Ensure_unsuccessful_file_access_attempts_are_collected"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.8_Ensure_events_that_modify_usergroup_information_are_collected"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.9_Ensure_discretionary_access_control_permission_modification_events_are_collected"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.10_Ensure_successful_file_system_mounts_are_collected"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.11_Ensure_session_initiation_information_is_collected"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.12_Ensure_login_and_logout_events_are_collected"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.13_Ensure_file_deletion_events_by_users_are_collected"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.14_Ensure_events_that_modify_the_systems_Mandatory_Access_Controls_are_collected"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.15_Ensure_successful_and_unsuccessful_attempts_to_use_the_chcon_command_are_recorded"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.16_Ensure_successful_and_unsuccessful_attempts_to_use_the_setfacl_command_are_recorded"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.17_Ensure_successful_and_unsuccessful_attempts_to_use_the_chacl_command_are_recorded"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.18_Ensure_successful_and_unsuccessful_attempts_to_use_the_usermod_command_are_recorded"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.19_Ensure_kernel_module_loading_unloading_and_modification_is_collected"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.20_Ensure_the_audit_configuration_is_immutable"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.21_Ensure_the_running_and_on_disk_configuration_is_the_same"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.4.1_Ensure_audit_log_files_are_mode_0640_or_less_permissive"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.4.2_Ensure_only_authorized_users_own_audit_log_files"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.4.3_Ensure_only_authorized_groups_are_assigned_ownership_of_audit_log_files"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.4.4_Ensure_the_audit_log_directory_is_0750_or_more_restrictive"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.4.5_Ensure_audit_configuration_files_are_640_or_more_restrictive"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.4.6_Ensure_audit_configuration_files_are_owned_by_root"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.4.7_Ensure_audit_configuration_files_belong_to_group_root"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.4.8_Ensure_audit_tools_are_755_or_more_restrictive"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.4.9_Ensure_audit_tools_are_owned_by_root"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.4.10_Ensure_audit_tools_belong_to_group_root"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.4.11_Ensure_cryptographic_mechanisms_are_used_to_protect_the_integrity_of_audit_tools"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.1_Ensure_permissions_on_etcpasswd_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.2_Ensure_permissions_on_etcpasswd-_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.3_Ensure_permissions_on_etcgroup_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.4_Ensure_permissions_on_etcgroup-_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.5_Ensure_permissions_on_etcshadow_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.6_Ensure_permissions_on_etcshadow-_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.7_Ensure_permissions_on_etcgshadow_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.8_Ensure_permissions_on_etcgshadow-_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.9_Ensure_permissions_on_etcshells_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.10_Ensure_permissions_on_etcopasswd_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.11_Ensure_world_writable_files_and_directories_are_secured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.12_Ensure_no_unowned_or_ungrouped_files_or_directories_exist"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.13_Ensure_SUID_and_SGID_files_are_reviewed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.1_Ensure_accounts_in_etcpasswd_use_shadowed_passwords"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.2_Ensure_etcshadow_password_fields_are_not_empty"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.3_Ensure_all_groups_in_etcpasswd_exist_in_etcgroup"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.4_Ensure_shadow_group_is_empty"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.5_Ensure_no_duplicate_UIDs_exist"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.6_Ensure_no_duplicate_GIDs_exist"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.7_Ensure_no_duplicate_user_names_exist"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.8_Ensure_no_duplicate_group_names_exist"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.9_Ensure_root_PATH_Integrity"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.10_Ensure_root_is_the_only_UID_0_account"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.11_Ensure_local_interactive_user_home_directories_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.12_Ensure_local_interactive_user_dot_files_access_is_configured"
                 selected="true"/>
</xccdf:Profile>
Level 1 - Workstation

Items in this profile intend to:

  • be practical and prudent;
  • provide a clear security benefit; and
  • not inhibit the utility of the technology beyond acceptable means.

This profile is intended for workstations.

Show Profile XML
<xccdf:Profile xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
               xmlns="http://checklists.nist.gov/xccdf/1.2"
               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
               xmlns:notes="http://benchmarks.cisecurity.org/notes"
               xmlns:xhtml="http://www.w3.org/1999/xhtml"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:sce="http://open-scap.org/page/SCE_xccdf_stream"
               xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog"
               xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2"
               xmlns:xlink="http://www.w3.org/1999/xlink"
               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
               id="xccdf_org.cisecurity.benchmarks_profile_Level_1_-_Workstation">
   <xccdf:title xml:lang="en">Level 1 - Workstation</xccdf:title>
   <xccdf:description xml:lang="en">
      <xhtml:p>Items in this profile intend to:</xhtml:p>
      <xhtml:ul>
         <xhtml:li>be practical and prudent;</xhtml:li>
         <xhtml:li>provide a clear security benefit; and</xhtml:li>
         <xhtml:li>not inhibit the utility of the technology beyond acceptable means.</xhtml:li>
      </xhtml:ul>
      <xhtml:p>This profile is intended for workstations.</xhtml:p>
   </xccdf:description>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.1.1_Ensure_mounting_of_cramfs_filesystems_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.1.2_Ensure_mounting_of_freevxfs_filesystems_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.1.3_Ensure_mounting_of_jffs2_filesystems_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.1.4_Ensure_mounting_of_hfs_filesystems_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.1.5_Ensure_mounting_of_hfsplus_filesystems_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.2.1_Ensure_tmp_is_a_separate_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.2.2_Ensure_nodev_option_set_on_tmp_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.2.3_Ensure_noexec_option_set_on_tmp_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.2.4_Ensure_nosuid_option_set_on_tmp_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.3.2_Ensure_nodev_option_set_on_var_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.3.3_Ensure_nosuid_option_set_on_var_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.4.2_Ensure_nodev_option_set_on_vartmp_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.4.3_Ensure_noexec_option_set_on_vartmp_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.4.4_Ensure_nosuid_option_set_on_vartmp_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.5.2_Ensure_nodev_option_set_on_varlog_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.5.3_Ensure_noexec_option_set_on_varlog_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.5.4_Ensure_nosuid_option_set_on_varlog_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.6.2_Ensure_nodev_option_set_on_varlogaudit_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.6.3_Ensure_noexec_option_set_on_varlogaudit_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.6.4_Ensure_nosuid_option_set_on_varlogaudit_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.7.2_Ensure_nodev_option_set_on_home_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.7.3_Ensure_nosuid_option_set_on_home_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.8.1_Ensure_nodev_option_set_on_devshm_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.8.2_Ensure_noexec_option_set_on_devshm_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.8.3_Ensure_nosuid_option_set_on_devshm_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.2.1_Ensure_AIDE_is_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.2.2_Ensure_filesystem_integrity_is_regularly_checked"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.3.1_Ensure_updates_patches_and_additional_security_software_are_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.3.2_Ensure_package_manager_repositories_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.3.3_Ensure_GPG_keys_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.4.1_Ensure_bootloader_password_is_set"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.4.2_Ensure_permissions_on_bootloader_config_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.4.3_Ensure_authentication_required_for_single_user_mode"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.5.1_Ensure_prelink_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.5.2_Ensure_address_space_layout_randomization_ASLR_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.5.3_Ensure_ptrace_scope_is_restricted"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.5.4_Ensure_Automatic_Error_Reporting_is_not_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.5.5_Ensure_core_dumps_are_restricted"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.6.1.1_Ensure_AppArmor_is_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.6.1.2_Ensure_AppArmor_is_enabled_in_the_bootloader_configuration"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.6.1.3_Ensure_all_AppArmor_Profiles_are_in_enforce_or_complain_mode"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.7.1_Ensure_message_of_the_day_is_configured_properly"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.7.2_Ensure_local_login_warning_banner_is_configured_properly"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.7.3_Ensure_remote_login_warning_banner_is_configured_properly"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.7.4_Ensure_permissions_on_etcmotd_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.7.5_Ensure_permissions_on_etcissue_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.7.6_Ensure_permissions_on_etcissue.net_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.8.2_Ensure_GDM_login_banner_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.8.3_Ensure_GDM_disable-user-list_option_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.8.4_Ensure_GDM_screen_locks_when_the_user_is_idle"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.8.5_Ensure_GDM_screen_locks_cannot_be_overridden"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.8.8_Ensure_GDM_autorun-never_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.8.9_Ensure_GDM_autorun-never_is_not_overridden"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.8.10_Ensure_XDCMP_is_not_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.1.1_Ensure_a_single_time_synchronization_daemon_is_in_use"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.2.1_Ensure_chrony_is_configured_with_authorized_timeserver"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.2.2_Ensure_chrony_is_running_as_user__chrony"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.2.3_Ensure_chrony_is_enabled_and_running"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.3.1_Ensure_systemd-timesyncd_configured_with_authorized_timeserver"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.3.2_Ensure_systemd-timesyncd_is_enabled_and_running"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.4.1_Ensure_ntp_access_control_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.4.2_Ensure_ntp_is_configured_with_authorized_timeserver"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.4.3_Ensure_ntp_is_running_as_user_ntp"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.4.4_Ensure_ntp_is_enabled_and_running"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.2_Ensure_Avahi_Server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.4_Ensure_DHCP_Server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.5_Ensure_LDAP_server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.6_Ensure_NFS_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.7_Ensure_DNS_Server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.8_Ensure_FTP_Server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.9_Ensure_HTTP_server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.10_Ensure_IMAP_and_POP3_server_are_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.11_Ensure_Samba_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.12_Ensure_HTTP_Proxy_Server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.13_Ensure_SNMP_Server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.14_Ensure_NIS_Server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.15_Ensure_dnsmasq_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.16_Ensure_mail_transfer_agent_is_configured_for_local-only_mode"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.17_Ensure_rsync_service_is_either_not_installed_or_is_masked"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.3.1_Ensure_NIS_Client_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.3.2_Ensure_rsh_client_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.3.3_Ensure_talk_client_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.3.4_Ensure_telnet_client_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.3.5_Ensure_LDAP_client_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.3.6_Ensure__RPC_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.4_Ensure_nonessential_services_are_removed_or_masked"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.1.1_Ensure_IPv6_status_is_identified"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.2.1_Ensure_packet_redirect_sending_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.2.2_Ensure_IP_forwarding_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.1_Ensure_source_routed_packets_are_not_accepted"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.2_Ensure_ICMP_redirects_are_not_accepted"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.3_Ensure_secure_ICMP_redirects_are_not_accepted"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.4_Ensure_suspicious_packets_are_logged"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.5_Ensure_broadcast_ICMP_requests_are_ignored"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.6_Ensure_bogus_ICMP_responses_are_ignored"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.7_Ensure_Reverse_Path_Filtering_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.8_Ensure_TCP_SYN_Cookies_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.9_Ensure_IPv6_router_advertisements_are_not_accepted"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.1.1_Ensure_ufw_is_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.1.2_Ensure_iptables-persistent_is_not_installed_with_ufw"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.1.3_Ensure_ufw_service_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.1.4_Ensure_ufw_loopback_traffic_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.1.5_Ensure_ufw_outbound_connections_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.1.6_Ensure_ufw_firewall_rules_exist_for_all_open_ports"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.1.7_Ensure_ufw_default_deny_firewall_policy"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.1_Ensure_nftables_is_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.2_Ensure_ufw_is_uninstalled_or_disabled_with_nftables"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.3_Ensure_iptables_are_flushed_with_nftables"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.4_Ensure_a_nftables_table_exists"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.5_Ensure_nftables_base_chains_exist"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.6_Ensure_nftables_loopback_traffic_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.7_Ensure_nftables_outbound_and_established_connections_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.8_Ensure_nftables_default_deny_firewall_policy"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.9_Ensure_nftables_service_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.10_Ensure_nftables_rules_are_permanent"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.1.1_Ensure_iptables_packages_are_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.1.2_Ensure_nftables_is_not_installed_with_iptables"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.1.3_Ensure_ufw_is_uninstalled_or_disabled_with_iptables"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.2.1_Ensure_iptables_default_deny_firewall_policy"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.2.2_Ensure_iptables_loopback_traffic_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.2.3_Ensure_iptables_outbound_and_established_connections_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.2.4_Ensure_iptables_firewall_rules_exist_for_all_open_ports"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.3.1_Ensure_ip6tables_default_deny_firewall_policy"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.3.2_Ensure_ip6tables_loopback_traffic_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.3.3_Ensure_ip6tables_outbound_and_established_connections_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.3.4_Ensure_ip6tables_firewall_rules_exist_for_all_open_ports"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.1_Ensure_cron_daemon_is_enabled_and_active"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.2_Ensure_permissions_on_etccrontab_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.3_Ensure_permissions_on_etccron.hourly_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.4_Ensure_permissions_on_etccron.daily_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.5_Ensure_permissions_on_etccron.weekly_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.6_Ensure_permissions_on_etccron.monthly_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.7_Ensure_permissions_on_etccron.d_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.8_Ensure_cron_is_restricted_to_authorized_users"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.9_Ensure_at_is_restricted_to_authorized_users"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.1_Ensure_permissions_on_etcsshsshd_config_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.2_Ensure_permissions_on_SSH_private_host_key_files_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.3_Ensure_permissions_on_SSH_public_host_key_files_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.4_Ensure_SSH_access_is_limited"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.5_Ensure_SSH_LogLevel_is_appropriate"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.6_Ensure_SSH_PAM_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.7_Ensure_SSH_root_login_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.8_Ensure_SSH_HostbasedAuthentication_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.9_Ensure_SSH_PermitEmptyPasswords_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.10_Ensure_SSH_PermitUserEnvironment_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.11_Ensure_SSH_IgnoreRhosts_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.12_Ensure_SSH_X11_forwarding_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.13_Ensure_only_strong_Ciphers_are_used"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.14_Ensure_only_strong_MAC_algorithms_are_used"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.15_Ensure_only_strong_Key_Exchange_algorithms_are_used"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.17_Ensure_SSH_warning_banner_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.18_Ensure_SSH_MaxAuthTries_is_set_to_4_or_less"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.19_Ensure_SSH_MaxStartups_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.20_Ensure_SSH_LoginGraceTime_is_set_to_one_minute_or_less"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.21_Ensure_SSH_MaxSessions_is_set_to_10_or_less"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.22_Ensure_SSH_Idle_Timeout_Interval_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.3.1_Ensure_sudo_is_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.3.2_Ensure_sudo_commands_use_pty"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.3.3_Ensure_sudo_log_file_exists"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.3.5_Ensure_re-authentication_for_privilege_escalation_is_not_disabled_globally"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.3.6_Ensure_sudo_authentication_timeout_is_configured_correctly"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.3.7_Ensure_access_to_the_su_command_is_restricted"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.4.1_Ensure_password_creation_requirements_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.4.2_Ensure_lockout_for_failed_password_attempts_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.4.3_Ensure_password_reuse_is_limited"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.4.4_Ensure_strong_password_hashing_algorithm_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.4.5_Ensure_all_current_passwords_uses_the_configured_hashing_algorithm"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.1.1_Ensure_minimum_days_between_password_changes_is__configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.1.2_Ensure_password_expiration_is_365_days_or_less"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.1.3_Ensure_password_expiration_warning_days_is_7_or_more"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.1.4_Ensure_inactive_password_lock_is_30_days_or_less"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.1.5_Ensure_all_users_last_password_change_date_is_in_the_past"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.1.6_Ensure_the_number_of_changed_characters_in_a_new_password_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.1.7_Ensure_preventing_the_use_of_dictionary_words_for_passwords_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.2_Ensure_system_accounts_are_secured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.3_Ensure_default_group_for_the_root_account_is_GID_0"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.4_Ensure_default_user_umask_is_027_or_more_restrictive"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.5_Ensure_default_user_shell_timeout_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.7_Ensure_maximum_number_of_same_consecutive_characters_in_a_password_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.1.1_Ensure_systemd-journal-remote_is_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.1.2_Ensure_systemd-journal-remote_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.1.3_Ensure_systemd-journal-remote_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.1.4_Ensure_journald_is_not_configured_to_receive_logs_from_a_remote_client"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.2_Ensure_journald_service_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.3_Ensure_journald_is_configured_to_compress_large_log_files"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.4_Ensure_journald_is_configured_to_write_logfiles_to_persistent_disk"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.5_Ensure_journald_is_not_configured_to_send_logs_to_rsyslog"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.6_Ensure_journald_log_rotation_is_configured_per_site_policy"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.7_Ensure_journald_default_file_permissions_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.2.1_Ensure_rsyslog_is_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.2.2_Ensure_rsyslog_service_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.2.3_Ensure_journald_is_configured_to_send_logs_to_rsyslog"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.2.4_Ensure_rsyslog_default_file_permissions_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.2.5_Ensure_logging_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.2.6_Ensure_rsyslog_is_configured_to_send_logs_to_a_remote_log_host"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.2.7_Ensure_rsyslog_is_not_configured_to_receive_logs_from_a_remote_client"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.3_Ensure_all_logfiles_have_appropriate_access_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.4.11_Ensure_cryptographic_mechanisms_are_used_to_protect_the_integrity_of_audit_tools"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.1_Ensure_permissions_on_etcpasswd_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.2_Ensure_permissions_on_etcpasswd-_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.3_Ensure_permissions_on_etcgroup_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.4_Ensure_permissions_on_etcgroup-_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.5_Ensure_permissions_on_etcshadow_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.6_Ensure_permissions_on_etcshadow-_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.7_Ensure_permissions_on_etcgshadow_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.8_Ensure_permissions_on_etcgshadow-_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.9_Ensure_permissions_on_etcshells_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.10_Ensure_permissions_on_etcopasswd_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.11_Ensure_world_writable_files_and_directories_are_secured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.12_Ensure_no_unowned_or_ungrouped_files_or_directories_exist"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.13_Ensure_SUID_and_SGID_files_are_reviewed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.1_Ensure_accounts_in_etcpasswd_use_shadowed_passwords"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.2_Ensure_etcshadow_password_fields_are_not_empty"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.3_Ensure_all_groups_in_etcpasswd_exist_in_etcgroup"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.4_Ensure_shadow_group_is_empty"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.5_Ensure_no_duplicate_UIDs_exist"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.6_Ensure_no_duplicate_GIDs_exist"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.7_Ensure_no_duplicate_user_names_exist"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.8_Ensure_no_duplicate_group_names_exist"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.9_Ensure_root_PATH_Integrity"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.10_Ensure_root_is_the_only_UID_0_account"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.11_Ensure_local_interactive_user_home_directories_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.12_Ensure_local_interactive_user_dot_files_access_is_configured"
                 selected="true"/>
</xccdf:Profile>
Level 2 - Workstation

This profile extends the "Level 1 - Workstation" profile. Items in this profile exhibit one or more of the following characteristics:

  • are intended for environments or use cases where security is paramount.
  • acts as defense in depth measure.
  • may negatively inhibit the utility or performance of the technology.

This profile is intended for workstations.

Show Profile XML
<xccdf:Profile xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
               xmlns="http://checklists.nist.gov/xccdf/1.2"
               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
               xmlns:notes="http://benchmarks.cisecurity.org/notes"
               xmlns:xhtml="http://www.w3.org/1999/xhtml"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:sce="http://open-scap.org/page/SCE_xccdf_stream"
               xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog"
               xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2"
               xmlns:xlink="http://www.w3.org/1999/xlink"
               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
               id="xccdf_org.cisecurity.benchmarks_profile_Level_2_-_Workstation">
   <xccdf:title xml:lang="en">Level 2 - Workstation</xccdf:title>
   <xccdf:description xml:lang="en">
      <xhtml:p>This profile extends the "Level 1 - Workstation" profile. Items in this profile exhibit one or more of the following characteristics:</xhtml:p>
      <xhtml:ul>
         <xhtml:li>are intended for environments or use cases where security is paramount.</xhtml:li>
         <xhtml:li>acts as defense in depth measure.</xhtml:li>
         <xhtml:li>may negatively inhibit the utility or performance of the technology.</xhtml:li>
      </xhtml:ul>
      <xhtml:p>This profile is intended for workstations.</xhtml:p>
   </xccdf:description>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.1.1_Ensure_mounting_of_cramfs_filesystems_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.1.2_Ensure_mounting_of_freevxfs_filesystems_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.1.3_Ensure_mounting_of_jffs2_filesystems_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.1.4_Ensure_mounting_of_hfs_filesystems_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.1.5_Ensure_mounting_of_hfsplus_filesystems_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.1.6_Ensure_mounting_of_squashfs_filesystems_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.1.7_Ensure_mounting_of_udf_filesystems_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.2.1_Ensure_tmp_is_a_separate_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.2.2_Ensure_nodev_option_set_on_tmp_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.2.3_Ensure_noexec_option_set_on_tmp_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.2.4_Ensure_nosuid_option_set_on_tmp_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.3.1_Ensure_separate_partition_exists_for_var"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.3.2_Ensure_nodev_option_set_on_var_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.3.3_Ensure_nosuid_option_set_on_var_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.4.1_Ensure_separate_partition_exists_for_vartmp"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.4.2_Ensure_nodev_option_set_on_vartmp_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.4.3_Ensure_noexec_option_set_on_vartmp_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.4.4_Ensure_nosuid_option_set_on_vartmp_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.5.1_Ensure_separate_partition_exists_for_varlog"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.5.2_Ensure_nodev_option_set_on_varlog_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.5.3_Ensure_noexec_option_set_on_varlog_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.5.4_Ensure_nosuid_option_set_on_varlog_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.6.1_Ensure_separate_partition_exists_for_varlogaudit"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.6.2_Ensure_nodev_option_set_on_varlogaudit_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.6.3_Ensure_noexec_option_set_on_varlogaudit_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.6.4_Ensure_nosuid_option_set_on_varlogaudit_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.7.1_Ensure_separate_partition_exists_for_home"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.7.2_Ensure_nodev_option_set_on_home_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.7.3_Ensure_nosuid_option_set_on_home_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.8.1_Ensure_nodev_option_set_on_devshm_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.8.2_Ensure_noexec_option_set_on_devshm_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.8.3_Ensure_nosuid_option_set_on_devshm_partition"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.9_Disable_Automounting"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.1.10_Disable_USB_Storage"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.2.1_Ensure_AIDE_is_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.2.2_Ensure_filesystem_integrity_is_regularly_checked"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.3.1_Ensure_updates_patches_and_additional_security_software_are_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.3.2_Ensure_package_manager_repositories_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.3.3_Ensure_GPG_keys_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.4.1_Ensure_bootloader_password_is_set"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.4.2_Ensure_permissions_on_bootloader_config_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.4.3_Ensure_authentication_required_for_single_user_mode"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.5.1_Ensure_prelink_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.5.2_Ensure_address_space_layout_randomization_ASLR_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.5.3_Ensure_ptrace_scope_is_restricted"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.5.4_Ensure_Automatic_Error_Reporting_is_not_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.5.5_Ensure_core_dumps_are_restricted"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.6.1.1_Ensure_AppArmor_is_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.6.1.2_Ensure_AppArmor_is_enabled_in_the_bootloader_configuration"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.6.1.3_Ensure_all_AppArmor_Profiles_are_in_enforce_or_complain_mode"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.6.1.4_Ensure_all_AppArmor_Profiles_are_enforcing"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.7.1_Ensure_message_of_the_day_is_configured_properly"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.7.2_Ensure_local_login_warning_banner_is_configured_properly"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.7.3_Ensure_remote_login_warning_banner_is_configured_properly"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.7.4_Ensure_permissions_on_etcmotd_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.7.5_Ensure_permissions_on_etcissue_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.7.6_Ensure_permissions_on_etcissue.net_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.8.2_Ensure_GDM_login_banner_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.8.3_Ensure_GDM_disable-user-list_option_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.8.4_Ensure_GDM_screen_locks_when_the_user_is_idle"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.8.5_Ensure_GDM_screen_locks_cannot_be_overridden"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.8.6_Ensure_GDM_automatic_mounting_of_removable_media_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.8.7_Ensure_GDM_disabling_automatic_mounting_of_removable_media_is_not_overridden"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.8.8_Ensure_GDM_autorun-never_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.8.9_Ensure_GDM_autorun-never_is_not_overridden"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_1.8.10_Ensure_XDCMP_is_not_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.1.1_Ensure_a_single_time_synchronization_daemon_is_in_use"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.2.1_Ensure_chrony_is_configured_with_authorized_timeserver"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.2.2_Ensure_chrony_is_running_as_user__chrony"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.2.3_Ensure_chrony_is_enabled_and_running"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.3.1_Ensure_systemd-timesyncd_configured_with_authorized_timeserver"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.3.2_Ensure_systemd-timesyncd_is_enabled_and_running"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.4.1_Ensure_ntp_access_control_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.4.2_Ensure_ntp_is_configured_with_authorized_timeserver"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.4.3_Ensure_ntp_is_running_as_user_ntp"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.1.4.4_Ensure_ntp_is_enabled_and_running"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.2_Ensure_Avahi_Server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.3_Ensure_CUPS_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.4_Ensure_DHCP_Server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.5_Ensure_LDAP_server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.6_Ensure_NFS_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.7_Ensure_DNS_Server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.8_Ensure_FTP_Server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.9_Ensure_HTTP_server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.10_Ensure_IMAP_and_POP3_server_are_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.11_Ensure_Samba_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.12_Ensure_HTTP_Proxy_Server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.13_Ensure_SNMP_Server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.14_Ensure_NIS_Server_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.15_Ensure_dnsmasq_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.16_Ensure_mail_transfer_agent_is_configured_for_local-only_mode"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.2.17_Ensure_rsync_service_is_either_not_installed_or_is_masked"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.3.1_Ensure_NIS_Client_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.3.2_Ensure_rsh_client_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.3.3_Ensure_talk_client_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.3.4_Ensure_telnet_client_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.3.5_Ensure_LDAP_client_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.3.6_Ensure__RPC_is_not_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_2.4_Ensure_nonessential_services_are_removed_or_masked"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.1.1_Ensure_IPv6_status_is_identified"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.1.4_Ensure_DCCP_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.1.5_Ensure_SCTP_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.1.6_Ensure_RDS_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.1.7_Ensure_TIPC_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.2.1_Ensure_packet_redirect_sending_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.2.2_Ensure_IP_forwarding_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.1_Ensure_source_routed_packets_are_not_accepted"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.2_Ensure_ICMP_redirects_are_not_accepted"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.3_Ensure_secure_ICMP_redirects_are_not_accepted"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.4_Ensure_suspicious_packets_are_logged"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.5_Ensure_broadcast_ICMP_requests_are_ignored"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.6_Ensure_bogus_ICMP_responses_are_ignored"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.7_Ensure_Reverse_Path_Filtering_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.8_Ensure_TCP_SYN_Cookies_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.3.9_Ensure_IPv6_router_advertisements_are_not_accepted"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.1.1_Ensure_ufw_is_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.1.2_Ensure_iptables-persistent_is_not_installed_with_ufw"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.1.3_Ensure_ufw_service_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.1.4_Ensure_ufw_loopback_traffic_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.1.5_Ensure_ufw_outbound_connections_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.1.6_Ensure_ufw_firewall_rules_exist_for_all_open_ports"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.1.7_Ensure_ufw_default_deny_firewall_policy"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.1_Ensure_nftables_is_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.2_Ensure_ufw_is_uninstalled_or_disabled_with_nftables"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.3_Ensure_iptables_are_flushed_with_nftables"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.4_Ensure_a_nftables_table_exists"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.5_Ensure_nftables_base_chains_exist"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.6_Ensure_nftables_loopback_traffic_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.7_Ensure_nftables_outbound_and_established_connections_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.8_Ensure_nftables_default_deny_firewall_policy"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.9_Ensure_nftables_service_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.10_Ensure_nftables_rules_are_permanent"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.1.1_Ensure_iptables_packages_are_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.1.2_Ensure_nftables_is_not_installed_with_iptables"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.1.3_Ensure_ufw_is_uninstalled_or_disabled_with_iptables"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.2.1_Ensure_iptables_default_deny_firewall_policy"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.2.2_Ensure_iptables_loopback_traffic_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.2.3_Ensure_iptables_outbound_and_established_connections_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.2.4_Ensure_iptables_firewall_rules_exist_for_all_open_ports"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.3.1_Ensure_ip6tables_default_deny_firewall_policy"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.3.2_Ensure_ip6tables_loopback_traffic_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.3.3_Ensure_ip6tables_outbound_and_established_connections_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.3.4_Ensure_ip6tables_firewall_rules_exist_for_all_open_ports"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.1_Ensure_cron_daemon_is_enabled_and_active"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.2_Ensure_permissions_on_etccrontab_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.3_Ensure_permissions_on_etccron.hourly_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.4_Ensure_permissions_on_etccron.daily_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.5_Ensure_permissions_on_etccron.weekly_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.6_Ensure_permissions_on_etccron.monthly_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.7_Ensure_permissions_on_etccron.d_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.8_Ensure_cron_is_restricted_to_authorized_users"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.1.9_Ensure_at_is_restricted_to_authorized_users"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.1_Ensure_permissions_on_etcsshsshd_config_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.2_Ensure_permissions_on_SSH_private_host_key_files_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.3_Ensure_permissions_on_SSH_public_host_key_files_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.4_Ensure_SSH_access_is_limited"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.5_Ensure_SSH_LogLevel_is_appropriate"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.6_Ensure_SSH_PAM_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.7_Ensure_SSH_root_login_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.8_Ensure_SSH_HostbasedAuthentication_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.9_Ensure_SSH_PermitEmptyPasswords_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.10_Ensure_SSH_PermitUserEnvironment_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.11_Ensure_SSH_IgnoreRhosts_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.12_Ensure_SSH_X11_forwarding_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.13_Ensure_only_strong_Ciphers_are_used"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.14_Ensure_only_strong_MAC_algorithms_are_used"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.15_Ensure_only_strong_Key_Exchange_algorithms_are_used"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.16_Ensure_SSH_AllowTcpForwarding_is_disabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.17_Ensure_SSH_warning_banner_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.18_Ensure_SSH_MaxAuthTries_is_set_to_4_or_less"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.19_Ensure_SSH_MaxStartups_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.20_Ensure_SSH_LoginGraceTime_is_set_to_one_minute_or_less"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.21_Ensure_SSH_MaxSessions_is_set_to_10_or_less"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.2.22_Ensure_SSH_Idle_Timeout_Interval_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.3.1_Ensure_sudo_is_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.3.2_Ensure_sudo_commands_use_pty"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.3.3_Ensure_sudo_log_file_exists"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.3.4_Ensure_users_must_provide_password_for_privilege_escalation"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.3.5_Ensure_re-authentication_for_privilege_escalation_is_not_disabled_globally"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.3.6_Ensure_sudo_authentication_timeout_is_configured_correctly"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.3.7_Ensure_access_to_the_su_command_is_restricted"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.4.1_Ensure_password_creation_requirements_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.4.2_Ensure_lockout_for_failed_password_attempts_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.4.3_Ensure_password_reuse_is_limited"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.4.4_Ensure_strong_password_hashing_algorithm_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.4.5_Ensure_all_current_passwords_uses_the_configured_hashing_algorithm"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.1.1_Ensure_minimum_days_between_password_changes_is__configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.1.2_Ensure_password_expiration_is_365_days_or_less"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.1.3_Ensure_password_expiration_warning_days_is_7_or_more"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.1.4_Ensure_inactive_password_lock_is_30_days_or_less"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.1.5_Ensure_all_users_last_password_change_date_is_in_the_past"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.1.6_Ensure_the_number_of_changed_characters_in_a_new_password_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.1.7_Ensure_preventing_the_use_of_dictionary_words_for_passwords_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.2_Ensure_system_accounts_are_secured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.3_Ensure_default_group_for_the_root_account_is_GID_0"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.4_Ensure_default_user_umask_is_027_or_more_restrictive"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.5_Ensure_default_user_shell_timeout_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.6_Ensure_nologin_is_not_listed_in_etcshells"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_4.5.7_Ensure_maximum_number_of_same_consecutive_characters_in_a_password_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.1.1_Ensure_systemd-journal-remote_is_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.1.2_Ensure_systemd-journal-remote_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.1.3_Ensure_systemd-journal-remote_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.1.4_Ensure_journald_is_not_configured_to_receive_logs_from_a_remote_client"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.2_Ensure_journald_service_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.3_Ensure_journald_is_configured_to_compress_large_log_files"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.4_Ensure_journald_is_configured_to_write_logfiles_to_persistent_disk"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.5_Ensure_journald_is_not_configured_to_send_logs_to_rsyslog"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.6_Ensure_journald_log_rotation_is_configured_per_site_policy"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.7_Ensure_journald_default_file_permissions_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.2.1_Ensure_rsyslog_is_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.2.2_Ensure_rsyslog_service_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.2.3_Ensure_journald_is_configured_to_send_logs_to_rsyslog"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.2.4_Ensure_rsyslog_default_file_permissions_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.2.5_Ensure_logging_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.2.6_Ensure_rsyslog_is_configured_to_send_logs_to_a_remote_log_host"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.2.7_Ensure_rsyslog_is_not_configured_to_receive_logs_from_a_remote_client"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.1.3_Ensure_all_logfiles_have_appropriate_access_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.1.1_Ensure_auditd_is_installed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.1.2_Ensure_auditd_service_is_enabled_and_active"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.1.3_Ensure_auditing_for_processes_that_start_prior_to_auditd_is_enabled"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.1.4_Ensure_audit_backlog_limit_is_sufficient"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.2.1_Ensure_audit_log_storage_size_is_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.2.2_Ensure_audit_logs_are_not_automatically_deleted"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.2.3_Ensure_system_is_disabled_when_audit_logs_are_full"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.1_Ensure_changes_to_system_administration_scope_sudoers_is_collected"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.2_Ensure_actions_as_another_user_are_always_logged"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.3_Ensure_events_that_modify_the_sudo_log_file_are_collected"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.4_Ensure_events_that_modify_date_and_time_information_are_collected"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.5_Ensure_events_that_modify_the_systems_network_environment_are_collected"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.6_Ensure_use_of_privileged_commands_are_collected"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.7_Ensure_unsuccessful_file_access_attempts_are_collected"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.8_Ensure_events_that_modify_usergroup_information_are_collected"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.9_Ensure_discretionary_access_control_permission_modification_events_are_collected"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.10_Ensure_successful_file_system_mounts_are_collected"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.11_Ensure_session_initiation_information_is_collected"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.12_Ensure_login_and_logout_events_are_collected"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.13_Ensure_file_deletion_events_by_users_are_collected"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.14_Ensure_events_that_modify_the_systems_Mandatory_Access_Controls_are_collected"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.15_Ensure_successful_and_unsuccessful_attempts_to_use_the_chcon_command_are_recorded"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.16_Ensure_successful_and_unsuccessful_attempts_to_use_the_setfacl_command_are_recorded"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.17_Ensure_successful_and_unsuccessful_attempts_to_use_the_chacl_command_are_recorded"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.18_Ensure_successful_and_unsuccessful_attempts_to_use_the_usermod_command_are_recorded"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.19_Ensure_kernel_module_loading_unloading_and_modification_is_collected"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.20_Ensure_the_audit_configuration_is_immutable"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.3.21_Ensure_the_running_and_on_disk_configuration_is_the_same"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.4.1_Ensure_audit_log_files_are_mode_0640_or_less_permissive"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.4.2_Ensure_only_authorized_users_own_audit_log_files"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.4.3_Ensure_only_authorized_groups_are_assigned_ownership_of_audit_log_files"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.4.4_Ensure_the_audit_log_directory_is_0750_or_more_restrictive"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.4.5_Ensure_audit_configuration_files_are_640_or_more_restrictive"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.4.6_Ensure_audit_configuration_files_are_owned_by_root"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.4.7_Ensure_audit_configuration_files_belong_to_group_root"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.4.8_Ensure_audit_tools_are_755_or_more_restrictive"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.4.9_Ensure_audit_tools_are_owned_by_root"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.4.10_Ensure_audit_tools_belong_to_group_root"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_5.2.4.11_Ensure_cryptographic_mechanisms_are_used_to_protect_the_integrity_of_audit_tools"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.1_Ensure_permissions_on_etcpasswd_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.2_Ensure_permissions_on_etcpasswd-_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.3_Ensure_permissions_on_etcgroup_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.4_Ensure_permissions_on_etcgroup-_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.5_Ensure_permissions_on_etcshadow_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.6_Ensure_permissions_on_etcshadow-_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.7_Ensure_permissions_on_etcgshadow_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.8_Ensure_permissions_on_etcgshadow-_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.9_Ensure_permissions_on_etcshells_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.10_Ensure_permissions_on_etcopasswd_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.11_Ensure_world_writable_files_and_directories_are_secured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.12_Ensure_no_unowned_or_ungrouped_files_or_directories_exist"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.1.13_Ensure_SUID_and_SGID_files_are_reviewed"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.1_Ensure_accounts_in_etcpasswd_use_shadowed_passwords"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.2_Ensure_etcshadow_password_fields_are_not_empty"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.3_Ensure_all_groups_in_etcpasswd_exist_in_etcgroup"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.4_Ensure_shadow_group_is_empty"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.5_Ensure_no_duplicate_UIDs_exist"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.6_Ensure_no_duplicate_GIDs_exist"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.7_Ensure_no_duplicate_user_names_exist"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.8_Ensure_no_duplicate_group_names_exist"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.9_Ensure_root_PATH_Integrity"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.10_Ensure_root_is_the_only_UID_0_account"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.11_Ensure_local_interactive_user_home_directories_are_configured"
                 selected="true"/>
   <xccdf:select idref="xccdf_org.cisecurity.benchmarks_rule_6.2.12_Ensure_local_interactive_user_dot_files_access_is_configured"
                 selected="true"/>
</xccdf:Profile>

Assessment Results

Display Only Essential Hygiene (CIS Critical Security Controls V8- IG-1)
Display Only Failures
More
w Benchmark Item Result
1 Initial Setup
1.1 Filesystem Configuration
1.1.1 Disable unused filesystems
1.0 1.1.1.1 Ensure mounting of cramfs filesystems is disabled Fail
1.0 1.1.1.2 Ensure mounting of freevxfs filesystems is disabled Fail
1.0 1.1.1.3 Ensure mounting of jffs2 filesystems is disabled Fail
1.0 1.1.1.4 Ensure mounting of hfs filesystems is disabled Fail
1.0 1.1.1.5 Ensure mounting of hfsplus filesystems is disabled Fail
1.1.2 Configure /tmp
1.0 1.1.2.1 Ensure /tmp is a separate partition Fail
1.0 1.1.2.2 Ensure nodev option set on /tmp partition Pass
1.0 1.1.2.3 Ensure noexec option set on /tmp partition Pass
1.0 1.1.2.4 Ensure nosuid option set on /tmp partition Pass
1.1.3 Configure /var
1.0 1.1.3.2 Ensure nodev option set on /var partition Pass
1.0 1.1.3.3 Ensure nosuid option set on /var partition Pass
1.1.4 Configure /var/tmp
1.0 1.1.4.2 Ensure nodev option set on /var/tmp partition Pass
1.0 1.1.4.3 Ensure noexec option set on /var/tmp partition Pass
1.0 1.1.4.4 Ensure nosuid option set on /var/tmp partition Pass
1.1.5 Configure /var/log
1.0 1.1.5.2 Ensure nodev option set on /var/log partition Pass
1.0 1.1.5.3 Ensure noexec option set on /var/log partition Pass
1.0 1.1.5.4 Ensure nosuid option set on /var/log partition Pass
1.1.6 Configure /var/log/audit
1.0 1.1.6.2 Ensure nodev option set on /var/log/audit partition Pass
1.0 1.1.6.3 Ensure noexec option set on /var/log/audit partition Pass
1.0 1.1.6.4 Ensure nosuid option set on /var/log/audit partition Pass
1.1.7 Configure /home
1.0 1.1.7.2 Ensure nodev option set on /home partition Pass
1.0 1.1.7.3 Ensure nosuid option set on /home partition Pass
1.1.8 Configure /dev/shm
1.0 1.1.8.1 Ensure nodev option set on /dev/shm partition Pass
1.0 1.1.8.2 Ensure noexec option set on /dev/shm partition Pass
1.0 1.1.8.3 Ensure nosuid option set on /dev/shm partition Pass
1.0 1.1.9 Disable Automounting Pass
1.0 1.1.10 Disable USB Storage Fail
1.2 Filesystem Integrity Checking
1.0 1.2.1 Ensure AIDE is installed Fail
1.0 1.2.2 Ensure filesystem integrity is regularly checked Fail
1.3 Configure Software and Patch Management


1.3.1 Ensure updates, patches, and additional security software are installed Manual


1.3.2 Ensure package manager repositories are configured Manual


1.3.3 Ensure GPG keys are configured Manual
1.4 Secure Boot Settings
1.0 1.4.1 Ensure bootloader password is set Fail
1.0 1.4.2 Ensure permissions on bootloader config are configured Fail
1.0 1.4.3 Ensure authentication required for single user mode Pass
1.5 Additional Process Hardening
1.0 1.5.1 Ensure prelink is not installed Pass
1.0 1.5.2 Ensure address space layout randomization (ASLR) is enabled Fail
1.0 1.5.3 Ensure ptrace_scope is restricted Pass
1.0 1.5.4 Ensure Automatic Error Reporting is not enabled Pass
1.0 1.5.5 Ensure core dumps are restricted Fail
1.6 Mandatory Access Control
1.6.1 Configure AppArmor
1.0 1.6.1.1 Ensure AppArmor is installed Fail
1.0 1.6.1.2 Ensure AppArmor is enabled in the bootloader configuration Fail
1.0 1.6.1.3 Ensure all AppArmor Profiles are in enforce or complain mode Fail
1.7 Command Line Warning Banners
1.0 1.7.1 Ensure message of the day is configured properly Pass
1.0 1.7.2 Ensure local login warning banner is configured properly Fail
1.0 1.7.3 Ensure remote login warning banner is configured properly Fail
1.0 1.7.4 Ensure permissions on /etc/motd are configured Pass
1.0 1.7.5 Ensure permissions on /etc/issue are configured Pass
1.0 1.7.6 Ensure permissions on /etc/issue.net are configured Pass
1.8 GNOME Display Manager
1.0 1.8.2 Ensure GDM login banner is configured Pass
1.0 1.8.3 Ensure GDM disable-user-list option is enabled Pass
1.0 1.8.4 Ensure GDM screen locks when the user is idle Pass
1.0 1.8.5 Ensure GDM screen locks cannot be overridden Pass
1.0 1.8.6 Ensure GDM automatic mounting of removable media is disabled Pass
1.0 1.8.7 Ensure GDM disabling automatic mounting of removable media is not overridden Pass
1.0 1.8.8 Ensure GDM autorun-never is enabled Pass
1.0 1.8.9 Ensure GDM autorun-never is not overridden Pass
1.0 1.8.10 Ensure XDCMP is not enabled Pass
2 Services
2.1 Configure Time Synchronization
2.1.1 Ensure time synchronization is in use
1.0 2.1.1.1 Ensure a single time synchronization daemon is in use Pass
2.1.2 Configure chrony


2.1.2.1 Ensure chrony is configured with authorized timeserver Manual
1.0 2.1.2.2 Ensure chrony is running as user _chrony Pass
1.0 2.1.2.3 Ensure chrony is enabled and running Pass
2.1.3 Configure systemd-timesyncd
1.0 2.1.3.1 Ensure systemd-timesyncd configured with authorized timeserver Fail


2.1.3.2 Ensure systemd-timesyncd is enabled and running Manual
2.1.4 Configure ntp
1.0 2.1.4.1 Ensure ntp access control is configured Pass


2.1.4.2 Ensure ntp is configured with authorized timeserver Manual
1.0 2.1.4.3 Ensure ntp is running as user ntp Pass
1.0 2.1.4.4 Ensure ntp is enabled and running Pass
2.2 Special Purpose Services
1.0 2.2.2 Ensure Avahi Server is not installed Pass
1.0 2.2.3 Ensure CUPS is not installed Pass
1.0 2.2.4 Ensure DHCP Server is not installed Pass
1.0 2.2.5 Ensure LDAP server is not installed Pass
1.0 2.2.6 Ensure NFS is not installed Pass
1.0 2.2.7 Ensure DNS Server is not installed Pass
1.0 2.2.8 Ensure FTP Server is not installed Pass
1.0 2.2.9 Ensure HTTP server is not installed Fail
1.0 2.2.10 Ensure IMAP and POP3 server are not installed Pass
1.0 2.2.11 Ensure Samba is not installed Pass
1.0 2.2.12 Ensure HTTP Proxy Server is not installed Pass
1.0 2.2.13 Ensure SNMP Server is not installed Pass
1.0 2.2.14 Ensure NIS Server is not installed Pass
1.0 2.2.15 Ensure dnsmasq is not installed Pass
1.0 2.2.16 Ensure mail transfer agent is configured for local-only mode Pass
1.0 2.2.17 Ensure rsync service is either not installed or is masked Pass
2.3 Service Clients
1.0 2.3.1 Ensure NIS Client is not installed Pass
1.0 2.3.2 Ensure rsh client is not installed Pass
1.0 2.3.3 Ensure talk client is not installed Pass
1.0 2.3.4 Ensure telnet client is not installed Fail
1.0 2.3.5 Ensure LDAP client is not installed Pass
1.0 2.3.6 Ensure RPC is not installed Pass


2.4 Ensure nonessential services are removed or masked Manual
3 Network Configuration
3.1 Disable unused network protocols and devices


3.1.1 Ensure IPv6 status is identified Manual
1.0 3.1.2 Ensure wireless interfaces are disabled Pass
1.0 3.1.3 Ensure bluetooth is disabled Pass
3.2 Network Parameters (Host Only)
1.0 3.2.1 Ensure packet redirect sending is disabled Fail
1.0 3.2.2 Ensure IP forwarding is disabled Fail
3.3 Network Parameters (Host and Router)
1.0 3.3.1 Ensure source routed packets are not accepted Fail
1.0 3.3.2 Ensure ICMP redirects are not accepted Fail
1.0 3.3.3 Ensure secure ICMP redirects are not accepted Fail
1.0 3.3.4 Ensure suspicious packets are logged Fail
1.0 3.3.5 Ensure broadcast ICMP requests are ignored Fail
1.0 3.3.6 Ensure bogus ICMP responses are ignored Fail
1.0 3.3.7 Ensure Reverse Path Filtering is enabled Fail
1.0 3.3.8 Ensure TCP SYN Cookies is enabled Fail
1.0 3.3.9 Ensure IPv6 router advertisements are not accepted Fail
3.4 Firewall Configuration
3.4.1 Configure UncomplicatedFirewall
1.0 3.4.1.1 Ensure ufw is installed Fail
1.0 3.4.1.2 Ensure iptables-persistent is not installed with ufw Pass
1.0 3.4.1.3 Ensure ufw service is enabled Fail
1.0 3.4.1.4 Ensure ufw loopback traffic is configured Fail


3.4.1.5 Ensure ufw outbound connections are configured Manual
1.0 3.4.1.6 Ensure ufw firewall rules exist for all open ports Fail
1.0 3.4.1.7 Ensure ufw default deny firewall policy Fail
3.4.2 Configure nftables
1.0 3.4.2.1 Ensure nftables is installed Fail
1.0 3.4.2.2 Ensure ufw is uninstalled or disabled with nftables Pass


3.4.2.3 Ensure iptables are flushed with nftables Manual
1.0 3.4.2.4 Ensure a nftables table exists Fail
1.0 3.4.2.5 Ensure nftables base chains exist Fail
1.0 3.4.2.6 Ensure nftables loopback traffic is configured Fail


3.4.2.7 Ensure nftables outbound and established connections are configured Manual
1.0 3.4.2.8 Ensure nftables default deny firewall policy Fail
1.0 3.4.2.9 Ensure nftables service is enabled Fail
1.0 3.4.2.10 Ensure nftables rules are permanent Fail
3.4.3 Configure iptables
3.4.3.1 Configure iptables software
1.0 3.4.3.1.1 Ensure iptables packages are installed Fail
1.0 3.4.3.1.2 Ensure nftables is not installed with iptables Pass
1.0 3.4.3.1.3 Ensure ufw is uninstalled or disabled with iptables Pass
3.4.3.2 Configure IPv4 iptables
1.0 3.4.3.2.1 Ensure iptables default deny firewall policy Fail
1.0 3.4.3.2.2 Ensure iptables loopback traffic is configured Fail


3.4.3.2.3 Ensure iptables outbound and established connections are configured Manual
1.0 3.4.3.2.4 Ensure iptables firewall rules exist for all open ports Fail
3.4.3.3 Configure IPv6 ip6tables
1.0 3.4.3.3.1 Ensure ip6tables default deny firewall policy Fail
1.0 3.4.3.3.2 Ensure ip6tables loopback traffic is configured Pass


3.4.3.3.3 Ensure ip6tables outbound and established connections are configured Manual
1.0 3.4.3.3.4 Ensure ip6tables firewall rules exist for all open ports Fail
4 Access, Authentication and Authorization
4.1 Configure time-based job schedulers
1.0 4.1.1 Ensure cron daemon is enabled and active Pass
1.0 4.1.2 Ensure permissions on /etc/crontab are configured Fail
1.0 4.1.3 Ensure permissions on /etc/cron.hourly are configured Fail
1.0 4.1.4 Ensure permissions on /etc/cron.daily are configured Fail
1.0 4.1.5 Ensure permissions on /etc/cron.weekly are configured Fail
1.0 4.1.6 Ensure permissions on /etc/cron.monthly are configured Fail
1.0 4.1.7 Ensure permissions on /etc/cron.d are configured Fail
1.0 4.1.8 Ensure cron is restricted to authorized users Fail
1.0 4.1.9 Ensure at is restricted to authorized users Pass
4.2 Configure SSH Server
1.0 4.2.1 Ensure permissions on /etc/ssh/sshd_config are configured Fail
1.0 4.2.2 Ensure permissions on SSH private host key files are configured Pass
1.0 4.2.3 Ensure permissions on SSH public host key files are configured Pass
1.0 4.2.4 Ensure SSH access is limited Fail
1.0 4.2.5 Ensure SSH LogLevel is appropriate Pass
1.0 4.2.6 Ensure SSH PAM is enabled Pass
1.0 4.2.7 Ensure SSH root login is disabled Fail
1.0 4.2.8 Ensure SSH HostbasedAuthentication is disabled Pass
1.0 4.2.9 Ensure SSH PermitEmptyPasswords is disabled Pass
1.0 4.2.10 Ensure SSH PermitUserEnvironment is disabled Pass
1.0 4.2.11 Ensure SSH IgnoreRhosts is enabled Pass
1.0 4.2.13 Ensure only strong Ciphers are used Pass
1.0 4.2.14 Ensure only strong MAC algorithms are used Fail
1.0 4.2.15 Ensure only strong Key Exchange algorithms are used Pass
1.0 4.2.17 Ensure SSH warning banner is configured Pass
1.0 4.2.18 Ensure SSH MaxAuthTries is set to 4 or less Fail
1.0 4.2.19 Ensure SSH MaxStartups is configured Fail
1.0 4.2.20 Ensure SSH LoginGraceTime is set to one minute or less Fail
1.0 4.2.21 Ensure SSH MaxSessions is set to 10 or less Pass
1.0 4.2.22 Ensure SSH Idle Timeout Interval is configured Pass
4.3 Configure privilege escalation
1.0 4.3.1 Ensure sudo is installed Pass
1.0 4.3.2 Ensure sudo commands use pty Fail
1.0 4.3.3 Ensure sudo log file exists Fail
1.0 4.3.5 Ensure re-authentication for privilege escalation is not disabled globally Pass
1.0 4.3.6 Ensure sudo authentication timeout is configured correctly Pass
1.0 4.3.7 Ensure access to the su command is restricted Fail
4.4 Configure PAM
1.0 4.4.1 Ensure password creation requirements are configured Fail
1.0 4.4.2 Ensure lockout for failed password attempts is configured Fail
1.0 4.4.3 Ensure password reuse is limited Fail
1.0 4.4.4 Ensure strong password hashing algorithm is configured Pass


4.4.5 Ensure all current passwords uses the configured hashing algorithm Manual
4.5 User Accounts and Environment
4.5.1 Set Shadow Password Suite Parameters
1.0 4.5.1.1 Ensure minimum days between password changes is configured Fail
1.0 4.5.1.2 Ensure password expiration is 365 days or less Fail
1.0 4.5.1.3 Ensure password expiration warning days is 7 or more Pass
1.0 4.5.1.4 Ensure inactive password lock is 30 days or less Fail
1.0 4.5.1.5 Ensure all users last password change date is in the past Pass
1.0 4.5.1.6 Ensure the number of changed characters in a new password is configured Fail
1.0 4.5.1.7 Ensure preventing the use of dictionary words for passwords is configured Fail
1.0 4.5.2 Ensure system accounts are secured Pass
1.0 4.5.3 Ensure default group for the root account is GID 0 Pass
1.0 4.5.4 Ensure default user umask is 027 or more restrictive Fail
1.0 4.5.5 Ensure default user shell timeout is configured Fail
1.0 4.5.7 Ensure maximum number of same consecutive characters in a password is configured Fail
5 Logging and Auditing
5.1 Configure Logging
5.1.1 Configure journald
5.1.1.1 Ensure journald is configured to send logs to a remote log host
1.0 5.1.1.1.1 Ensure systemd-journal-remote is installed Fail


5.1.1.1.2 Ensure systemd-journal-remote is configured Manual


5.1.1.1.3 Ensure systemd-journal-remote is enabled Manual
1.0 5.1.1.1.4 Ensure journald is not configured to receive logs from a remote client Pass
1.0 5.1.1.2 Ensure journald service is enabled Pass
1.0 5.1.1.3 Ensure journald is configured to compress large log files Fail
1.0 5.1.1.4 Ensure journald is configured to write logfiles to persistent disk Fail


5.1.1.5 Ensure journald is not configured to send logs to rsyslog Manual


5.1.1.6 Ensure journald log rotation is configured per site policy Manual


5.1.1.7 Ensure journald default file permissions configured Manual
5.1.2 Configure rsyslog
1.0 5.1.2.1 Ensure rsyslog is installed Fail
1.0 5.1.2.2 Ensure rsyslog service is enabled Fail


5.1.2.3 Ensure journald is configured to send logs to rsyslog Manual
1.0 5.1.2.4 Ensure rsyslog default file permissions are configured Fail


5.1.2.5 Ensure logging is configured Manual


5.1.2.6 Ensure rsyslog is configured to send logs to a remote log host Manual
1.0 5.1.2.7 Ensure rsyslog is not configured to receive logs from a remote client Pass
1.0 5.1.3 Ensure all logfiles have appropriate access configured Pass
5.2 Configure System Accounting (auditd)
5.2.1 Ensure auditing is enabled
5.2.2 Configure Data Retention
5.2.3 Configure auditd rules
5.2.4 Configure auditd file access
1.0 5.2.4.11 Ensure cryptographic mechanisms are used to protect the integrity of audit tools Fail
6 System Maintenance
6.1 System File Permissions
1.0 6.1.1 Ensure permissions on /etc/passwd are configured Pass
1.0 6.1.2 Ensure permissions on /etc/passwd- are configured Pass
1.0 6.1.3 Ensure permissions on /etc/group are configured Pass
1.0 6.1.4 Ensure permissions on /etc/group- are configured Pass
1.0 6.1.5 Ensure permissions on /etc/shadow are configured Pass
1.0 6.1.6 Ensure permissions on /etc/shadow- are configured Pass
1.0 6.1.7 Ensure permissions on /etc/gshadow are configured Pass
1.0 6.1.8 Ensure permissions on /etc/gshadow- are configured Pass
1.0 6.1.9 Ensure permissions on /etc/shells are configured Pass
1.0 6.1.10 Ensure permissions on /etc/opasswd are configured Fail
1.0 6.1.11 Ensure world writable files and directories are secured Fail
1.0 6.1.12 Ensure no unowned or ungrouped files or directories exist Fail


6.1.13 Ensure SUID and SGID files are reviewed Manual
6.2 Local User and Group Settings
1.0 6.2.1 Ensure accounts in /etc/passwd use shadowed passwords Pass
1.0 6.2.2 Ensure /etc/shadow password fields are not empty Pass
1.0 6.2.3 Ensure all groups in /etc/passwd exist in /etc/group Pass
1.0 6.2.4 Ensure shadow group is empty Pass
1.0 6.2.5 Ensure no duplicate UIDs exist Pass
1.0 6.2.6 Ensure no duplicate GIDs exist Pass
1.0 6.2.7 Ensure no duplicate user names exist Pass
1.0 6.2.8 Ensure no duplicate group names exist Pass
1.0 6.2.9 Ensure root PATH Integrity Pass
1.0 6.2.10 Ensure root is the only UID 0 account Pass
1.0 6.2.11 Ensure local interactive user home directories are configured Fail
1.0 6.2.12 Ensure local interactive user dot files access is configured Fail

Assessment Details

1 Initial Setup

Items in this section are advised for all systems, but may be difficult or require extensive preparation after the initial setup of the system.

1.1 Filesystem Configuration

Directories that are used for system-wide functions can be further protected by placing them on separate partitions. This provides protection for resource exhaustion and enables the use of mounting options that are applicable to the directory's intended use. Users' data can be stored on separate partitions and have stricter mount options. A user partition is a filesystem that has been established for use by the users and does not contain software for system operations.

The recommendations in this section are easier to perform during initial system installation. If the system is already installed, it is recommended that a full backup be performed before repartitioning the system.

Note: If you are repartitioning a system that has already been installed (This may require the system to be in single-user mode):

  • Mount the new partition to a temporary mountpoint e.g. mount /dev/sda2 /mnt
  • Copy data from the original partition to the new partition. e.g. cp /var/tmp/* /mnt
  • Verify that all data is present on the new partition. e.g. ls -la /mnt
  • Unmount the new partition. e.g. umount /mnt
  • Remove the data from the original directory that was in the old partition. e.g. rm -Rf /var/tmp/* Otherwise it will still consume space in the old partition that will be masked when the new filesystem is mounted.
  • Mount the new partition to the desired mountpoint. e.g. mount /dev/sda2 /var/tmp
  • Update /etc/fstab with the new mountpoint. e.g. /dev/sda2 /var/tmp xfs defaults,rw,nosuid,nodev,noexec,relatime 0 0

1.1.1 Disable unused filesystems

A number of uncommon filesystem types are supported under Linux. Removing support for unneeded filesystem types reduces the local attack surface of the system. If a filesystem type is not needed it should be disabled. Native Linux file systems are designed to ensure that built-in security controls function as expected. Non-native filesystems can lead to unexpected consequences to both the security and functionality of the system and should be used with caution. Many filesystems are created for niche use cases and are not maintained and supported as the operating systems are updated and patched. Users of non-native filesystems should ensure that there is attention and ongoing support for them, especially in light of frequent operating system changes.

Standard network connectivity and Internet access to cloud storage may make the use of non-standard filesystem formats to directly attach heterogeneous devices much less attractive.

Note : This should not be considered a comprehensive list of filesystems. You may wish to consider additions to those listed here for your environment. For the current available file system modules on the system see /usr/lib/modules/$(uname -r)/kernel/fs

Start up scripts

Kernel modules loaded directly via insmod will ignore what is configured in the relevant /etc/modprobe.d/*.conf files. If modules are still being loaded after a reboot whilst having the correctly configured blacklist and install command, check for insmod entries in start up scripts such as .bashrc .

You may also want to check /lib/modprobe.d/ . Please note that this directory should not be used for user defined module loading. Ensure that all such entries resides in /etc/modprobe.d/*.conf files.

Return values

By using /bin/false as the command in disabling a particular module serves two purposes; to convey the meaning of the entry to the user and cause a non-zero return value. The latter can be tested for in scripts. Please note that insmod will ignore what is configured in the relevant /etc/modprobe.d/*.conf files. The preferred way to load modules is with modprobe .

Fail

1.1.1.1 Ensure mounting of cramfs filesystems is disabled

Description:

The cramfs filesystem type is a compressed read-only Linux filesystem embedded in small footprint systems. A cramfs image can be used without having to first decompress the image.

Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.

Run the following script to disable the cramfs module:

If the module is available in the running kernel:

  • Create a file with install cramfs /bin/false in the /etc/modprobe.d/ directory
  • Create a file with blacklist cramfs in the /etc/modprobe.d/ directory
  • Unload cramfs from the kernel

If available in ANY installed kernel:

  • Create a file with blacklist cramfs in the /etc/modprobe.d/ directory

If the kernel module is not available on the system or pre-compiled into the kernel:

  • No remediation is necessary
#!/usr/bin/env bash



{

l_mname="cramfs" # set module name

l_mtype="fs" # set module type

l_mpath="/lib/modules/**/kernel/$l_mtype"

l_mpname="$(tr '-' '_' <<< "$l_mname")"

l_mndir="$(tr '-' '/' <<< "$l_mname")"



module_loadable_fix()

{

# If the module is currently loadable, add "install {MODULE_NAME} /bin/false" to a file in "/etc/modprobe.d"

l_loadable="$(modprobe -n -v "$l_mname")"

[ "$(wc -l <<< "$l_loadable")" -gt "1" ] && l_loadable="$(grep -P -- "(^\h*install|\b$l_mname)\b" <<< "$l_loadable")"

if ! grep -Pq -- '^\h*install \/bin\/(true|false)' <<< "$l_loadable"; then

echo -e "\n - setting module: \"$l_mname\" to be not loadable"

echo -e "install $l_mname /bin/false" >> /etc/modprobe.d/"$l_mpname".conf

fi

}

module_loaded_fix()

{

# If the module is currently loaded, unload the module

if lsmod | grep "$l_mname" > /dev/null 2>&1; then

echo -e "\n - unloading module \"$l_mname\""

modprobe -r "$l_mname"

fi

}

module_deny_fix()

{

# If the module isn't deny listed, denylist the module

if ! modprobe --showconfig | grep -Pq -- "^\h*blacklist\h+$l_mpname\b"; then

echo -e "\n - deny listing \"$l_mname\""

echo -e "blacklist $l_mname" >> /etc/modprobe.d/"$l_mpname".conf

fi

}

# Check if the module exists on the system

for l_mdir in $l_mpath; do

if [ -d "$l_mdir/$l_mndir" ] && [ -n "$(ls -A $l_mdir/$l_mndir)" ]; then

echo -e "\n - module: \"$l_mname\" exists in \"$l_mdir\"\n - checking if disabled..."

module_deny_fix

if [ "$l_mdir" = "/lib/modules/$(uname -r)/kernel/$l_mtype" ]; then

module_loadable_fix

module_loaded_fix

fi

else

echo -e "\n - module: \"$l_mname\" doesn't exist in \"$l_mdir\"\n"

fi

done

echo -e "\n - remediation of module: \"$l_mname\" complete\n"

}

Show Assessment Evidence
Complex Check
AND
Script: sce/nix_module_chk_v2.sh
Result: Fail
Exit Value: 102
Output:
  • -- INFO --
  • - module: "cramfs" exists in:
  • - "/lib/modules/5.4.0-1106-gcp/kernel/fs"
  • - Audit Result:
  • ** FAIL **
  • - Reason(s) for audit failure:
  • - module: "cramfs" is not deny listed
  • - module: "cramfs" is loadable: "insmod /lib/modules/5.4.0-1106-gcp/kernel/fs/cramfs/cramfs.ko "
  • - Correctly set:
  • - module: "cramfs" is not loaded
No error lines were collected.


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.1.1.1_Ensure_mounting_of_cramfs_filesystems_is_disabled"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.849-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>fail</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-7</xccdf:ident>
   <xccdf:complex-check operator="AND" negate="false">
      <xccdf:check system="http://open-scap.org/page/SCE"
                   negate="false"
                   multi-check="false">
         <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                             value-id="xccdf_org.cisecurity.benchmarks_value_3994868_var"/>
         <xccdf:check-content-ref href="sce/nix_module_chk_v2.sh"/>
         <xccdf:check-content>
            <command_result href="sce/nix_module_chk_v2.sh"
                            xccdf="fail"
                            script="/root/Assessor/sce/nix_module_chk_v2.sh"
                            exit-value="102">
               <out>
                  <l/>
                  <l/>
                  <l> -- INFO --</l>
                  <l> - module: "cramfs" exists in:</l>
                  <l>  - "/lib/modules/5.4.0-1106-gcp/kernel/fs"</l>
                  <l/>
                  <l>- Audit Result:</l>
                  <l>  ** FAIL **</l>
                  <l> - Reason(s) for audit failure:</l>
                  <l/>
                  <l> - module: "cramfs" is not deny listed</l>
                  <l> - module: "cramfs" is loadable: "insmod /lib/modules/5.4.0-1106-gcp/kernel/fs/cramfs/cramfs.ko "</l>
                  <l/>
                  <l/>
                  <l>- Correctly set:</l>
                  <l/>
                  <l> - module: "cramfs" is not loaded</l>
                  <l/>
               </out>
               <err/>
               <env/>
            </command_result>
         </xccdf:check-content>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="sce">
               <table class="evidence-sep" width="100%">
                  <tbody class="tbe">
                     <tr>
                        <td class="bold">Script:</td>
                        <td>sce/nix_module_chk_v2.sh</td>
                     </tr>
                     <tr>
                        <td class="bold">Result:</td>
                        <td class="fail">Fail</td>
                     </tr>
                     <tr>
                        <td class="bold">Exit Value:</td>
                        <td>102</td>
                     </tr>
                  </tbody>
               </table>
               <table class="evidence" width="100%">
                  <tbody class="tbe">
                     <tr>
                        <td class="bold">Output:</td>
                        <td>
                           <ul class="unstyled">
                              <li/>
                              <li/>
                              <li> -- INFO --</li>
                              <li> - module: "cramfs" exists in:</li>
                              <li>  - "/lib/modules/5.4.0-1106-gcp/kernel/fs"</li>
                              <li/>
                              <li>- Audit Result:</li>
                              <li>  ** FAIL **</li>
                              <li> - Reason(s) for audit failure:</li>
                              <li/>
                              <li> - module: "cramfs" is not deny listed</li>
                              <li> - module: "cramfs" is loadable: "insmod /lib/modules/5.4.0-1106-gcp/kernel/fs/cramfs/cramfs.ko "</li>
                              <li/>
                              <li/>
                              <li>- Correctly set:</li>
                              <li/>
                              <li> - module: "cramfs" is not loaded</li>
                              <li/>
                           </ul>
                        </td>
                     </tr>
                  </tbody>
               </table>
               <table class="evidence" width="100%">
                  <tbody class="tbe">
                     <tr>
                        <td>No error lines were collected.</td>
                     </tr>
                  </tbody>
               </table>
            </div>
         </evidence>
      </xccdf:check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

  • URL: NIST SP 800-53 Rev. 5: CM-7

CIS Controls V7.0:

  • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
    CIS Control Information
    Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
    Subcontrol: 9.2
    Label: Ensure Only Approved Ports, Protocols and Services Are Running
    Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
  • >

CIS Critical Security Controls V8.0:

  • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
    CIS Control Information
    Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
    Safeguard: 4.8
    Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
    Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
    Implementation Group: IG-2
    Security Function: Protect
  • >

Fail

1.1.1.2 Ensure mounting of freevxfs filesystems is disabled

Description:

The freevxfs filesystem type is a free version of the Veritas type filesystem. This is the primary filesystem type for HP-UX operating systems.

Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.

Run the following script to disable the freevxfs module:

If the module is available in the running kernel:

  • Create a file with install freevxfs /bin/false in the /etc/modprobe.d/ directory
  • Create a file with blacklist freevxfs in the /etc/modprobe.d/ directory
  • Unload freevxfs from the kernel

If available in ANY installed kernel:

  • Create a file with blacklist freevxfs in the /etc/modprobe.d/ directory

If the kernel module is not available on the system or pre-compiled into the kernel:

  • No remediation is necessary
#!/usr/bin/env bash



{

l_mname="freevxfs" # set module name

l_mtype="fs" # set module type

l_mpath="/lib/modules/**/kernel/$l_mtype"

l_mpname="$(tr '-' '_' <<< "$l_mname")"

l_mndir="$(tr '-' '/' <<< "$l_mname")"



module_loadable_fix()

{

# If the module is currently loadable, add "install {MODULE_NAME} /bin/false" to a file in "/etc/modprobe.d"

l_loadable="$(modprobe -n -v "$l_mname")"

[ "$(wc -l <<< "$l_loadable")" -gt "1" ] && l_loadable="$(grep -P -- "(^\h*install|\b$l_mname)\b" <<< "$l_loadable")"

if ! grep -Pq -- '^\h*install \/bin\/(true|false)' <<< "$l_loadable"; then

echo -e "\n - setting module: \"$l_mname\" to be not loadable"

echo -e "install $l_mname /bin/false" >> /etc/modprobe.d/"$l_mpname".conf

fi

}

module_loaded_fix()

{

# If the module is currently loaded, unload the module

if lsmod | grep "$l_mname" > /dev/null 2>&1; then

echo -e "\n - unloading module \"$l_mname\""

modprobe -r "$l_mname"

fi

}

module_deny_fix()

{

# If the module isn't deny listed, denylist the module

if ! modprobe --showconfig | grep -Pq -- "^\h*blacklist\h+$l_mpname\b"; then

echo -e "\n - deny listing \"$l_mname\""

echo -e "blacklist $l_mname" >> /etc/modprobe.d/"$l_mpname".conf

fi

}

# Check if the module exists on the system

for l_mdir in $l_mpath; do

if [ -d "$l_mdir/$l_mndir" ] && [ -n "$(ls -A $l_mdir/$l_mndir)" ]; then

echo -e "\n - module: \"$l_mname\" exists in \"$l_mdir\"\n - checking if disabled..."

module_deny_fix

if [ "$l_mdir" = "/lib/modules/$(uname -r)/kernel/$l_mtype" ]; then

module_loadable_fix

module_loaded_fix

fi

else

echo -e "\n - module: \"$l_mname\" doesn't exist in \"$l_mdir\"\n"

fi

done

echo -e "\n - remediation of module: \"$l_mname\" complete\n"

}

Show Assessment Evidence
Complex Check
AND
Script: sce/nix_module_chk_v2.sh
Result: Fail
Exit Value: 102
Output:
  • -- INFO --
  • - module: "freevxfs" exists in:
  • - "/lib/modules/5.4.0-1106-gcp/kernel/fs"
  • - Audit Result:
  • ** FAIL **
  • - Reason(s) for audit failure:
  • - module: "freevxfs" is not deny listed
  • - module: "freevxfs" is loadable: "insmod /lib/modules/5.4.0-1106-gcp/kernel/fs/freevxfs/freevxfs.ko "
  • - Correctly set:
  • - module: "freevxfs" is not loaded
No error lines were collected.


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.1.1.2_Ensure_mounting_of_freevxfs_filesystems_is_disabled"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.849-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>fail</xccdf:result>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-7</xccdf:ident>
   <xccdf:complex-check operator="AND" negate="false">
      <xccdf:check system="http://open-scap.org/page/SCE"
                   negate="false"
                   multi-check="false">
         <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                             value-id="xccdf_org.cisecurity.benchmarks_value_3994869_var"/>
         <xccdf:check-content-ref href="sce/nix_module_chk_v2.sh"/>
         <xccdf:check-content>
            <command_result href="sce/nix_module_chk_v2.sh"
                            xccdf="fail"
                            script="/root/Assessor/sce/nix_module_chk_v2.sh"
                            exit-value="102">
               <out>
                  <l/>
                  <l/>
                  <l> -- INFO --</l>
                  <l> - module: "freevxfs" exists in:</l>
                  <l>  - "/lib/modules/5.4.0-1106-gcp/kernel/fs"</l>
                  <l/>
                  <l>- Audit Result:</l>
                  <l>  ** FAIL **</l>
                  <l> - Reason(s) for audit failure:</l>
                  <l/>
                  <l> - module: "freevxfs" is not deny listed</l>
                  <l> - module: "freevxfs" is loadable: "insmod /lib/modules/5.4.0-1106-gcp/kernel/fs/freevxfs/freevxfs.ko "</l>
                  <l/>
                  <l/>
                  <l>- Correctly set:</l>
                  <l/>
                  <l> - module: "freevxfs" is not loaded</l>
                  <l/>
               </out>
               <err/>
               <env/>
            </command_result>
         </xccdf:check-content>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="sce">
               <table class="evidence-sep" width="100%">
                  <tbody class="tbe">
                     <tr>
                        <td class="bold">Script:</td>
                        <td>sce/nix_module_chk_v2.sh</td>
                     </tr>
                     <tr>
                        <td class="bold">Result:</td>
                        <td class="fail">Fail</td>
                     </tr>
                     <tr>
                        <td class="bold">Exit Value:</td>
                        <td>102</td>
                     </tr>
                  </tbody>
               </table>
               <table class="evidence" width="100%">
                  <tbody class="tbe">
                     <tr>
                        <td class="bold">Output:</td>
                        <td>
                           <ul class="unstyled">
                              <li/>
                              <li/>
                              <li> -- INFO --</li>
                              <li> - module: "freevxfs" exists in:</li>
                              <li>  - "/lib/modules/5.4.0-1106-gcp/kernel/fs"</li>
                              <li/>
                              <li>- Audit Result:</li>
                              <li>  ** FAIL **</li>
                              <li> - Reason(s) for audit failure:</li>
                              <li/>
                              <li> - module: "freevxfs" is not deny listed</li>
                              <li> - module: "freevxfs" is loadable: "insmod /lib/modules/5.4.0-1106-gcp/kernel/fs/freevxfs/freevxfs.ko "</li>
                              <li/>
                              <li/>
                              <li>- Correctly set:</li>
                              <li/>
                              <li> - module: "freevxfs" is not loaded</li>
                              <li/>
                           </ul>
                        </td>
                     </tr>
                  </tbody>
               </table>
               <table class="evidence" width="100%">
                  <tbody class="tbe">
                     <tr>
                        <td>No error lines were collected.</td>
                     </tr>
                  </tbody>
               </table>
            </div>
         </evidence>
      </xccdf:check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

  • URL: NIST SP 800-53 Rev. 5: CM-7

CIS Controls V7.0:

  • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
    CIS Control Information
    Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
    Subcontrol: 9.2
    Label: Ensure Only Approved Ports, Protocols and Services Are Running
    Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
  • >

CIS Critical Security Controls V8.0:

  • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
    CIS Control Information
    Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
    Safeguard: 4.8
    Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
    Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
    Implementation Group: IG-2
    Security Function: Protect
  • >

Fail

1.1.1.3 Ensure mounting of jffs2 filesystems is disabled

Description:

The jffs2 (journaling flash filesystem 2) filesystem type is a log-structured filesystem used in flash memory devices.

Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.

Run the following script to disable the jffs2 module:

If the module is available in the running kernel:

  • Create a file with install jffs2 /bin/false in the /etc/modprobe.d/ directory
  • Create a file with blacklist jffs2 in the /etc/modprobe.d/ directory
  • Unload jffs2 from the kernel

If available in ANY installed kernel:

  • Create a file with blacklist jffs2 in the /etc/modprobe.d/ directory

If the kernel module is not available on the system or pre-compiled into the kernel:

  • No remediation is necessary
#!/usr/bin/env bash



{

l_mname="jffs2" # set module name

l_mtype="fs" # set module type

l_mpath="/lib/modules/**/kernel/$l_mtype"

l_mpname="$(tr '-' '_' <<< "$l_mname")"

l_mndir="$(tr '-' '/' <<< "$l_mname")"



module_loadable_fix()

{

# If the module is currently loadable, add "install {MODULE_NAME} /bin/false" to a file in "/etc/modprobe.d"

l_loadable="$(modprobe -n -v "$l_mname")"

[ "$(wc -l <<< "$l_loadable")" -gt "1" ] && l_loadable="$(grep -P -- "(^\h*install|\b$l_mname)\b" <<< "$l_loadable")"

if ! grep -Pq -- '^\h*install \/bin\/(true|false)' <<< "$l_loadable"; then

echo -e "\n - setting module: \"$l_mname\" to be not loadable"

echo -e "install $l_mname /bin/false" >> /etc/modprobe.d/"$l_mpname".conf

fi

}

module_loaded_fix()

{

# If the module is currently loaded, unload the module

if lsmod | grep "$l_mname" > /dev/null 2>&1; then

echo -e "\n - unloading module \"$l_mname\""

modprobe -r "$l_mname"

fi

}

module_deny_fix()

{

# If the module isn't deny listed, denylist the module

if ! modprobe --showconfig | grep -Pq -- "^\h*blacklist\h+$l_mpname\b"; then

echo -e "\n - deny listing \"$l_mname\""

echo -e "blacklist $l_mname" >> /etc/modprobe.d/"$l_mpname".conf

fi

}

# Check if the module exists on the system

for l_mdir in $l_mpath; do

if [ -d "$l_mdir/$l_mndir" ] && [ -n "$(ls -A $l_mdir/$l_mndir)" ]; then

echo -e "\n - module: \"$l_mname\" exists in \"$l_mdir\"\n - checking if disabled..."

module_deny_fix

if [ "$l_mdir" = "/lib/modules/$(uname -r)/kernel/$l_mtype" ]; then

module_loadable_fix

module_loaded_fix

fi

else

echo -e "\n - module: \"$l_mname\" doesn't exist in \"$l_mdir\"\n"

fi

done

echo -e "\n - remediation of module: \"$l_mname\" complete\n"

}

Show Assessment Evidence
Complex Check
AND
Script: sce/nix_module_chk_v2.sh
Result: Fail
Exit Value: 102
Output:
  • -- INFO --
  • - module: "jffs2" exists in:
  • - "/lib/modules/5.4.0-1106-gcp/kernel/fs"
  • - Audit Result:
  • ** FAIL **
  • - Reason(s) for audit failure:
  • - module: "jffs2" is not deny listed
  • - module: "jffs2" is loadable: "insmod /lib/modules/5.4.0-1106-gcp/kernel/fs/jffs2/jffs2.ko "
  • - Correctly set:
  • - module: "jffs2" is not loaded
No error lines were collected.


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.1.1.3_Ensure_mounting_of_jffs2_filesystems_is_disabled"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.849-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>fail</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-7</xccdf:ident>
   <xccdf:complex-check operator="AND" negate="false">
      <xccdf:check system="http://open-scap.org/page/SCE"
                   negate="false"
                   multi-check="false">
         <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                             value-id="xccdf_org.cisecurity.benchmarks_value_3994870_var"/>
         <xccdf:check-content-ref href="sce/nix_module_chk_v2.sh"/>
         <xccdf:check-content>
            <command_result href="sce/nix_module_chk_v2.sh"
                            xccdf="fail"
                            script="/root/Assessor/sce/nix_module_chk_v2.sh"
                            exit-value="102">
               <out>
                  <l/>
                  <l/>
                  <l> -- INFO --</l>
                  <l> - module: "jffs2" exists in:</l>
                  <l>  - "/lib/modules/5.4.0-1106-gcp/kernel/fs"</l>
                  <l/>
                  <l>- Audit Result:</l>
                  <l>  ** FAIL **</l>
                  <l> - Reason(s) for audit failure:</l>
                  <l/>
                  <l> - module: "jffs2" is not deny listed</l>
                  <l> - module: "jffs2" is loadable: "insmod /lib/modules/5.4.0-1106-gcp/kernel/fs/jffs2/jffs2.ko "</l>
                  <l/>
                  <l/>
                  <l>- Correctly set:</l>
                  <l/>
                  <l> - module: "jffs2" is not loaded</l>
                  <l/>
               </out>
               <err/>
               <env/>
            </command_result>
         </xccdf:check-content>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="sce">
               <table class="evidence-sep" width="100%">
                  <tbody class="tbe">
                     <tr>
                        <td class="bold">Script:</td>
                        <td>sce/nix_module_chk_v2.sh</td>
                     </tr>
                     <tr>
                        <td class="bold">Result:</td>
                        <td class="fail">Fail</td>
                     </tr>
                     <tr>
                        <td class="bold">Exit Value:</td>
                        <td>102</td>
                     </tr>
                  </tbody>
               </table>
               <table class="evidence" width="100%">
                  <tbody class="tbe">
                     <tr>
                        <td class="bold">Output:</td>
                        <td>
                           <ul class="unstyled">
                              <li/>
                              <li/>
                              <li> -- INFO --</li>
                              <li> - module: "jffs2" exists in:</li>
                              <li>  - "/lib/modules/5.4.0-1106-gcp/kernel/fs"</li>
                              <li/>
                              <li>- Audit Result:</li>
                              <li>  ** FAIL **</li>
                              <li> - Reason(s) for audit failure:</li>
                              <li/>
                              <li> - module: "jffs2" is not deny listed</li>
                              <li> - module: "jffs2" is loadable: "insmod /lib/modules/5.4.0-1106-gcp/kernel/fs/jffs2/jffs2.ko "</li>
                              <li/>
                              <li/>
                              <li>- Correctly set:</li>
                              <li/>
                              <li> - module: "jffs2" is not loaded</li>
                              <li/>
                           </ul>
                        </td>
                     </tr>
                  </tbody>
               </table>
               <table class="evidence" width="100%">
                  <tbody class="tbe">
                     <tr>
                        <td>No error lines were collected.</td>
                     </tr>
                  </tbody>
               </table>
            </div>
         </evidence>
      </xccdf:check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

  • URL: NIST SP 800-53 Rev. 5: CM-7

CIS Controls V7.0:

  • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
    CIS Control Information
    Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
    Subcontrol: 9.2
    Label: Ensure Only Approved Ports, Protocols and Services Are Running
    Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
  • >

CIS Critical Security Controls V8.0:

  • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
    CIS Control Information
    Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
    Safeguard: 4.8
    Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
    Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
    Implementation Group: IG-2
    Security Function: Protect
  • >

Fail

1.1.1.4 Ensure mounting of hfs filesystems is disabled

Description:

The hfs filesystem type is a hierarchical filesystem that allows you to mount Mac OS filesystems.

Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.

Run the following script to disable the hfs module:

If the module is available in the running kernel:

  • Create a file with install hfs /bin/false in the /etc/modprobe.d/ directory
  • Create a file with blacklist hfs in the /etc/modprobe.d/ directory
  • Unload hfs from the kernel

If available in ANY installed kernel:

  • Create a file with blacklist hfs in the /etc/modprobe.d/ directory

If the kernel module is not available on the system or pre-compiled into the kernel:

  • No remediation is necessary
#!/usr/bin/env bash



{

l_mname="hfs" # set module name

l_mtype="fs" # set module type

l_mpath="/lib/modules/**/kernel/$l_mtype"

l_mpname="$(tr '-' '_' <<< "$l_mname")"

l_mndir="$(tr '-' '/' <<< "$l_mname")"



module_loadable_fix()

{

# If the module is currently loadable, add "install {MODULE_NAME} /bin/false" to a file in "/etc/modprobe.d"

l_loadable="$(modprobe -n -v "$l_mname")"

[ "$(wc -l <<< "$l_loadable")" -gt "1" ] && l_loadable="$(grep -P -- "(^\h*install|\b$l_mname)\b" <<< "$l_loadable")"

if ! grep -Pq -- '^\h*install \/bin\/(true|false)' <<< "$l_loadable"; then

echo -e "\n - setting module: \"$l_mname\" to be not loadable"

echo -e "install $l_mname /bin/false" >> /etc/modprobe.d/"$l_mpname".conf

fi

}

module_loaded_fix()

{

# If the module is currently loaded, unload the module

if lsmod | grep "$l_mname" > /dev/null 2>&1; then

echo -e "\n - unloading module \"$l_mname\""

modprobe -r "$l_mname"

fi

}

module_deny_fix()

{

# If the module isn't deny listed, denylist the module

if ! modprobe --showconfig | grep -Pq -- "^\h*blacklist\h+$l_mpname\b"; then

echo -e "\n - deny listing \"$l_mname\""

echo -e "blacklist $l_mname" >> /etc/modprobe.d/"$l_mpname".conf

fi

}

# Check if the module exists on the system

for l_mdir in $l_mpath; do

if [ -d "$l_mdir/$l_mndir" ] && [ -n "$(ls -A $l_mdir/$l_mndir)" ]; then

echo -e "\n - module: \"$l_mname\" exists in \"$l_mdir\"\n - checking if disabled..."

module_deny_fix

if [ "$l_mdir" = "/lib/modules/$(uname -r)/kernel/$l_mtype" ]; then

module_loadable_fix

module_loaded_fix

fi

else

echo -e "\n - module: \"$l_mname\" doesn't exist in \"$l_mdir\"\n"

fi

done

echo -e "\n - remediation of module: \"$l_mname\" complete\n"

}

Show Assessment Evidence
Complex Check
AND
Script: sce/nix_module_chk_v2.sh
Result: Fail
Exit Value: 102
Output:
  • -- INFO --
  • - module: "hfs" exists in:
  • - "/lib/modules/5.4.0-1106-gcp/kernel/fs"
  • - Audit Result:
  • ** FAIL **
  • - Reason(s) for audit failure:
  • - module: "hfs" is not deny listed
  • - module: "hfs" is loadable: "insmod /lib/modules/5.4.0-1106-gcp/kernel/fs/hfs/hfs.ko "
  • - Correctly set:
  • - module: "hfs" is not loaded
No error lines were collected.


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.1.1.4_Ensure_mounting_of_hfs_filesystems_is_disabled"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.849-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>fail</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-7</xccdf:ident>
   <xccdf:complex-check operator="AND" negate="false">
      <xccdf:check system="http://open-scap.org/page/SCE"
                   negate="false"
                   multi-check="false">
         <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                             value-id="xccdf_org.cisecurity.benchmarks_value_3994872_var"/>
         <xccdf:check-content-ref href="sce/nix_module_chk_v2.sh"/>
         <xccdf:check-content>
            <command_result href="sce/nix_module_chk_v2.sh"
                            xccdf="fail"
                            script="/root/Assessor/sce/nix_module_chk_v2.sh"
                            exit-value="102">
               <out>
                  <l/>
                  <l/>
                  <l> -- INFO --</l>
                  <l> - module: "hfs" exists in:</l>
                  <l>  - "/lib/modules/5.4.0-1106-gcp/kernel/fs"</l>
                  <l/>
                  <l>- Audit Result:</l>
                  <l>  ** FAIL **</l>
                  <l> - Reason(s) for audit failure:</l>
                  <l/>
                  <l> - module: "hfs" is not deny listed</l>
                  <l> - module: "hfs" is loadable: "insmod /lib/modules/5.4.0-1106-gcp/kernel/fs/hfs/hfs.ko "</l>
                  <l/>
                  <l/>
                  <l>- Correctly set:</l>
                  <l/>
                  <l> - module: "hfs" is not loaded</l>
                  <l/>
               </out>
               <err/>
               <env/>
            </command_result>
         </xccdf:check-content>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="sce">
               <table class="evidence-sep" width="100%">
                  <tbody class="tbe">
                     <tr>
                        <td class="bold">Script:</td>
                        <td>sce/nix_module_chk_v2.sh</td>
                     </tr>
                     <tr>
                        <td class="bold">Result:</td>
                        <td class="fail">Fail</td>
                     </tr>
                     <tr>
                        <td class="bold">Exit Value:</td>
                        <td>102</td>
                     </tr>
                  </tbody>
               </table>
               <table class="evidence" width="100%">
                  <tbody class="tbe">
                     <tr>
                        <td class="bold">Output:</td>
                        <td>
                           <ul class="unstyled">
                              <li/>
                              <li/>
                              <li> -- INFO --</li>
                              <li> - module: "hfs" exists in:</li>
                              <li>  - "/lib/modules/5.4.0-1106-gcp/kernel/fs"</li>
                              <li/>
                              <li>- Audit Result:</li>
                              <li>  ** FAIL **</li>
                              <li> - Reason(s) for audit failure:</li>
                              <li/>
                              <li> - module: "hfs" is not deny listed</li>
                              <li> - module: "hfs" is loadable: "insmod /lib/modules/5.4.0-1106-gcp/kernel/fs/hfs/hfs.ko "</li>
                              <li/>
                              <li/>
                              <li>- Correctly set:</li>
                              <li/>
                              <li> - module: "hfs" is not loaded</li>
                              <li/>
                           </ul>
                        </td>
                     </tr>
                  </tbody>
               </table>
               <table class="evidence" width="100%">
                  <tbody class="tbe">
                     <tr>
                        <td>No error lines were collected.</td>
                     </tr>
                  </tbody>
               </table>
            </div>
         </evidence>
      </xccdf:check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

  • URL: NIST SP 800-53 Rev. 5: CM-7

CIS Controls V7.0:

  • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
    CIS Control Information
    Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
    Subcontrol: 9.2
    Label: Ensure Only Approved Ports, Protocols and Services Are Running
    Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
  • >

CIS Critical Security Controls V8.0:

  • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
    CIS Control Information
    Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
    Safeguard: 4.8
    Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
    Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
    Implementation Group: IG-2
    Security Function: Protect
  • >

Fail

1.1.1.5 Ensure mounting of hfsplus filesystems is disabled

Description:

The hfsplus filesystem type is a hierarchical filesystem designed to replace hfs that allows you to mount Mac OS filesystems.

Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.

Run the following script to disable the hfsplus module:

If the module is available in the running kernel:

  • Create a file with install hfsplus /bin/false in the /etc/modprobe.d/ directory
  • Create a file with blacklist hfsplus in the /etc/modprobe.d/ directory
  • Unload hfsplus from the kernel

If available in ANY installed kernel:

  • Create a file with blacklist hfsplus in the /etc/modprobe.d/ directory

If the kernel module is not available on the system or pre-compiled into the kernel:

  • No remediation is necessary
#!/usr/bin/env bash



{

l_mname="hfsplus" # set module name

l_mtype="fs" # set module type

l_mpath="/lib/modules/**/kernel/$l_mtype"

l_mpname="$(tr '-' '_' <<< "$l_mname")"

l_mndir="$(tr '-' '/' <<< "$l_mname")"



module_loadable_fix()

{

# If the module is currently loadable, add "install {MODULE_NAME} /bin/false" to a file in "/etc/modprobe.d"

l_loadable="$(modprobe -n -v "$l_mname")"

[ "$(wc -l <<< "$l_loadable")" -gt "1" ] && l_loadable="$(grep -P -- "(^\h*install|\b$l_mname)\b" <<< "$l_loadable")"

if ! grep -Pq -- '^\h*install \/bin\/(true|false)' <<< "$l_loadable"; then

echo -e "\n - setting module: \"$l_mname\" to be not loadable"

echo -e "install $l_mname /bin/false" >> /etc/modprobe.d/"$l_mpname".conf

fi

}

module_loaded_fix()

{

# If the module is currently loaded, unload the module

if lsmod | grep "$l_mname" > /dev/null 2>&1; then

echo -e "\n - unloading module \"$l_mname\""

modprobe -r "$l_mname"

fi

}

module_deny_fix()

{

# If the module isn't deny listed, denylist the module

if ! modprobe --showconfig | grep -Pq -- "^\h*blacklist\h+$l_mpname\b"; then

echo -e "\n - deny listing \"$l_mname\""

echo -e "blacklist $l_mname" >> /etc/modprobe.d/"$l_mpname".conf

fi

}

# Check if the module exists on the system

for l_mdir in $l_mpath; do

if [ -d "$l_mdir/$l_mndir" ] && [ -n "$(ls -A $l_mdir/$l_mndir)" ]; then

echo -e "\n - module: \"$l_mname\" exists in \"$l_mdir\"\n - checking if disabled..."

module_deny_fix

if [ "$l_mdir" = "/lib/modules/$(uname -r)/kernel/$l_mtype" ]; then

module_loadable_fix

module_loaded_fix

fi

else

echo -e "\n - module: \"$l_mname\" doesn't exist in \"$l_mdir\"\n"

fi

done

echo -e "\n - remediation of module: \"$l_mname\" complete\n"

}

Show Assessment Evidence
Complex Check
AND
Script: sce/nix_module_chk_v2.sh
Result: Fail
Exit Value: 102
Output:
  • -- INFO --
  • - module: "hfsplus" exists in:
  • - "/lib/modules/5.4.0-1106-gcp/kernel/fs"
  • - Audit Result:
  • ** FAIL **
  • - Reason(s) for audit failure:
  • - module: "hfsplus" is not deny listed
  • - module: "hfsplus" is loadable: "insmod /lib/modules/5.4.0-1106-gcp/kernel/fs/hfsplus/hfsplus.ko "
  • - Correctly set:
  • - module: "hfsplus" is not loaded
No error lines were collected.


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.1.1.5_Ensure_mounting_of_hfsplus_filesystems_is_disabled"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.850-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>fail</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-7</xccdf:ident>
   <xccdf:complex-check operator="AND" negate="false">
      <xccdf:check system="http://open-scap.org/page/SCE"
                   negate="false"
                   multi-check="false">
         <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                             value-id="xccdf_org.cisecurity.benchmarks_value_3994874_var"/>
         <xccdf:check-content-ref href="sce/nix_module_chk_v2.sh"/>
         <xccdf:check-content>
            <command_result href="sce/nix_module_chk_v2.sh"
                            xccdf="fail"
                            script="/root/Assessor/sce/nix_module_chk_v2.sh"
                            exit-value="102">
               <out>
                  <l/>
                  <l/>
                  <l> -- INFO --</l>
                  <l> - module: "hfsplus" exists in:</l>
                  <l>  - "/lib/modules/5.4.0-1106-gcp/kernel/fs"</l>
                  <l/>
                  <l>- Audit Result:</l>
                  <l>  ** FAIL **</l>
                  <l> - Reason(s) for audit failure:</l>
                  <l/>
                  <l> - module: "hfsplus" is not deny listed</l>
                  <l> - module: "hfsplus" is loadable: "insmod /lib/modules/5.4.0-1106-gcp/kernel/fs/hfsplus/hfsplus.ko "</l>
                  <l/>
                  <l/>
                  <l>- Correctly set:</l>
                  <l/>
                  <l> - module: "hfsplus" is not loaded</l>
                  <l/>
               </out>
               <err/>
               <env/>
            </command_result>
         </xccdf:check-content>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="sce">
               <table class="evidence-sep" width="100%">
                  <tbody class="tbe">
                     <tr>
                        <td class="bold">Script:</td>
                        <td>sce/nix_module_chk_v2.sh</td>
                     </tr>
                     <tr>
                        <td class="bold">Result:</td>
                        <td class="fail">Fail</td>
                     </tr>
                     <tr>
                        <td class="bold">Exit Value:</td>
                        <td>102</td>
                     </tr>
                  </tbody>
               </table>
               <table class="evidence" width="100%">
                  <tbody class="tbe">
                     <tr>
                        <td class="bold">Output:</td>
                        <td>
                           <ul class="unstyled">
                              <li/>
                              <li/>
                              <li> -- INFO --</li>
                              <li> - module: "hfsplus" exists in:</li>
                              <li>  - "/lib/modules/5.4.0-1106-gcp/kernel/fs"</li>
                              <li/>
                              <li>- Audit Result:</li>
                              <li>  ** FAIL **</li>
                              <li> - Reason(s) for audit failure:</li>
                              <li/>
                              <li> - module: "hfsplus" is not deny listed</li>
                              <li> - module: "hfsplus" is loadable: "insmod /lib/modules/5.4.0-1106-gcp/kernel/fs/hfsplus/hfsplus.ko "</li>
                              <li/>
                              <li/>
                              <li>- Correctly set:</li>
                              <li/>
                              <li> - module: "hfsplus" is not loaded</li>
                              <li/>
                           </ul>
                        </td>
                     </tr>
                  </tbody>
               </table>
               <table class="evidence" width="100%">
                  <tbody class="tbe">
                     <tr>
                        <td>No error lines were collected.</td>
                     </tr>
                  </tbody>
               </table>
            </div>
         </evidence>
      </xccdf:check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

  • URL: NIST SP 800-53 Rev. 5: CM-7

CIS Controls V7.0:

  • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
    CIS Control Information
    Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
    Subcontrol: 9.2
    Label: Ensure Only Approved Ports, Protocols and Services Are Running
    Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
  • >

CIS Critical Security Controls V8.0:

  • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
    CIS Control Information
    Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
    Safeguard: 4.8
    Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
    Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
    Implementation Group: IG-2
    Security Function: Protect
  • >

1.1.2 Configure /tmp

The /tmp directory is a world-writable directory used for temporary storage by all users and some applications.

Fail

1.1.2.1 Ensure /tmp is a separate partition

Description:

The /tmp directory is a world-writable directory used for temporary storage by all users and some applications.

Making /tmp its own file system allows an administrator to set additional mount options such as the noexec option on the mount, making /tmp useless for an attacker to install executable code. It would also prevent an attacker from establishing a hard link to a system setuid program and wait for it to be updated. Once the program was updated, the hard link would be broken and the attacker would have his own copy of the program. If the program happened to have a security vulnerability, the attacker could continue to exploit the known flaw.

This can be accomplished by either mounting tmpfs to /tmp , or creating a separate partition for /tmp .

For specific configuration requirements of the /tmp mount for your environment, modify /etc/fstab or tmp.mount unit file:

Using /etc/fstab :

Configure /etc/fstab as appropriate:

Example:

tmpfs /tmp tmpfs defaults,rw,nosuid,nodev,noexec,relatime 0 0

-OR-

Using a tmp.mount unit file:

Run the following command to create the tmp.mount file is the correct location:

# cp -v /usr/share/systemd/tmp.mount /etc/systemd/system/

Edit /etc/systemd/system/tmp.mount to configure the /tmp mount:

Example:

# SPDX-License-Identifier: LGPL-2.1+

#

# This file is part of systemd.

#

# systemd is free software; you can redistribute it and/or modify it

# under the terms of the GNU Lesser General Public License as published by

# the Free Software Foundation; either version 2.1 of the License, or

# (at your option) any later version.



[Unit]

Description=Temporary Directory (/tmp)

Documentation=https://systemd.io/TEMPORARY_DIRECTORIES

Documentation=man:file-hierarchy(7)

Documentation=https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems

ConditionPathIsSymbolicLink=!/tmp

DefaultDependencies=no

Conflicts=umount.target

Before=local-fs.target umount.target

After=swap.target



[Mount]

What=tmpfs

Where=/tmp

Type=tmpfs

Options=mode=1777,strictatime,nosuid,nodev,noexec



[Install]

WantedBy=local-fs.target

Run the following command to reload the systemd daemon with the updated tmp.mount unit file:

# systemctl daemon-reload

Run the following command to enable and start tmp.mount

# systemctl --now enable tmp.mount

Note: A reboot may be required to transition to /tmp mounted to tmpfs

Impact:

Since the /tmp directory is intended to be world-writable, there is a risk of resource exhaustion if it is not bound to a separate partition.

Running out of /tmp space is a problem regardless of what kind of filesystem lies under it, but in a configuration where /tmp is not a separate file system it will essentially have the whole disk available, as the default installation only creates a single / partition. On the other hand, a RAM-based /tmp (as with tmpfs ) will almost certainly be much smaller, which can lead to applications filling up the filesystem much more easily. Another alternative is to create a dedicated partition for /tmp from a separate volume or disk. One of the downsides of a disk-based dedicated partition is that it will be slower than tmpfs which is RAM-based.

/tmp utilizing tmpfs can be resized using the size={size} parameter in the relevant entry in /etc/fstab .

Show Assessment Evidence
Complex Check
AND
Criterion: Ensure partition at /tmp and all
Existence Check: At Least One Exists
Item Check: All
Result: Fail
No matching system items were found.


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.1.2.1_Ensure_tmp_is_a_separate_partition"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.851-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>fail</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems/</xccdf:ident>
   <xccdf:ident system="URL">https://www.freedesktop.org/software/systemd/man/systemd-fstab-generator.html</xccdf:ident>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-7</xccdf:ident>
   <xccdf:complex-check operator="AND" negate="false">
      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                   negate="false"
                   multi-check="false">
         <xccdf:check-content-ref href="#OVAL-Results-1"
                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994881"/>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="definition"
                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994881">
               <div class="criteria">
                  <div class="criterion"
                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994881"
                       check="all"
                       check_existence="at_least_one_exists">
                     <table class="evidence-sep" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Criterion:</td>
                              <td>Ensure partition at /tmp  and all</td>
                           </tr>
                           <tr>
                              <td class="bold">Existence Check:</td>
                              <td>At Least One Exists</td>
                           </tr>
                           <tr>
                              <td class="bold">Item Check:</td>
                              <td>All</td>
                           </tr>
                           <tr>
                              <td class="bold">Result:</td>
                              <td class="fail">Fail</td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <tr>
                           <td>No matching system items were found.</td>
                        </tr>
                     </table>
                  </div>
               </div>
            </div>
         </evidence>
      </xccdf:check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

  • URL: https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems/
  • URL: https://www.freedesktop.org/software/systemd/man/systemd-fstab-generator.html
  • URL: NIST SP 800-53 Rev. 5: CM-7

CIS Controls V7.0:

  • Control 14: Controlled Access Based on the Need to Know: -- More
    CIS Control Information
    Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
    Subcontrol: 14.6
    Label: Protect Information through Access Control Lists
    Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
  • >

CIS Critical Security Controls V8.0:

  • Control 3: Data Protection: -- More
    CIS Control Information
    Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
    Safeguard: 3.3
    Label: Configure Data Access Control Lists
    Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
    Implementation Group: IG-1
    Security Function: Protect
  • >

Pass

1.1.2.2 Ensure nodev option set on /tmp partition

Description:

The nodev mount option specifies that the filesystem cannot contain special devices.

Since the /tmp filesystem is not intended to support devices, set this option to ensure that users cannot create block or character special devices in /tmp .

Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /tmp partition.

Example:

<device> /tmp <fstype> defaults,rw,nosuid,nodev,noexec,relatime 0 0

Run the following command to remount /tmp with the configured options:

# mount -o remount /tmp

Show Assessment Evidence
Complex Check
AND
Criterion: Ensure partition at /tmp may exists and all have at least one partition option equals 'nodev' (string)
Existence Check: Any Exist
Item Check: All
Result: Pass
No matching system items were found.


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.1.2.2_Ensure_nodev_option_set_on_tmp_partition"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.851-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>pass</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">See the fstab(5) manual page for more information.</xccdf:ident>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3, MP-2</xccdf:ident>
   <xccdf:complex-check operator="AND" negate="false">
      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                   negate="false"
                   multi-check="false">
         <xccdf:check-content-ref href="#OVAL-Results-1"
                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994883"/>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="definition"
                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994883">
               <div class="criteria">
                  <div class="criterion"
                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994883"
                       check="all"
                       check_existence="any_exist">
                     <table class="evidence-sep" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Criterion:</td>
                              <td>Ensure partition at /tmp may exists and all have at least one partition option equals 'nodev' (string)</td>
                           </tr>
                           <tr>
                              <td class="bold">Existence Check:</td>
                              <td>Any Exist</td>
                           </tr>
                           <tr>
                              <td class="bold">Item Check:</td>
                              <td>All</td>
                           </tr>
                           <tr>
                              <td class="bold">Result:</td>
                              <td class="pass">Pass</td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <tr>
                           <td>No matching system items were found.</td>
                        </tr>
                     </table>
                  </div>
               </div>
            </div>
         </evidence>
      </xccdf:check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

  • URL: See the fstab(5) manual page for more information.
  • URL: NIST SP 800-53 Rev. 5: AC-3, MP-2

CIS Controls V7.0:

  • Control 14: Controlled Access Based on the Need to Know: -- More
    CIS Control Information
    Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
    Subcontrol: 14.6
    Label: Protect Information through Access Control Lists
    Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
  • >

CIS Critical Security Controls V8.0:

  • Control 3: Data Protection: -- More
    CIS Control Information
    Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
    Safeguard: 3.3
    Label: Configure Data Access Control Lists
    Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
    Implementation Group: IG-1
    Security Function: Protect
  • >

Pass

1.1.2.3 Ensure noexec option set on /tmp partition

Description:

The noexec mount option specifies that the filesystem cannot contain executable binaries.

Since the /tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot run executable binaries from /tmp .

Edit the /etc/fstab file and add noexec to the fourth field (mounting options) for the /tmp partition.

Example:

<device> /tmp <fstype> defaults,rw,nosuid,nodev,noexec,relatime 0 0

Run the following command to remount /tmp with the configured options:

# mount -o remount /tmp

Show Assessment Evidence
Complex Check
AND
Criterion: Ensure partition at /tmp may exists{else}exists and all
Existence Check: Any Exist
Item Check: All
Result: Pass
No matching system items were found.


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.1.2.3_Ensure_noexec_option_set_on_tmp_partition"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.852-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>pass</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">See the fstab(5) manual page for more information.</xccdf:ident>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3, MP-2</xccdf:ident>
   <xccdf:complex-check operator="AND" negate="false">
      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                   negate="false"
                   multi-check="false">
         <xccdf:check-content-ref href="#OVAL-Results-1"
                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994885"/>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="definition"
                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994885">
               <div class="criteria">
                  <div class="criterion"
                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994885"
                       check="all"
                       check_existence="any_exist">
                     <table class="evidence-sep" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Criterion:</td>
                              <td>Ensure partition at /tmp may exists{else}exists and all</td>
                           </tr>
                           <tr>
                              <td class="bold">Existence Check:</td>
                              <td>Any Exist</td>
                           </tr>
                           <tr>
                              <td class="bold">Item Check:</td>
                              <td>All</td>
                           </tr>
                           <tr>
                              <td class="bold">Result:</td>
                              <td class="pass">Pass</td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <tr>
                           <td>No matching system items were found.</td>
                        </tr>
                     </table>
                  </div>
               </div>
            </div>
         </evidence>
      </xccdf:check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

  • URL: See the fstab(5) manual page for more information.
  • URL: NIST SP 800-53 Rev. 5: AC-3, MP-2

CIS Controls V7.0:

  • Control 14: Controlled Access Based on the Need to Know: -- More
    CIS Control Information
    Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
    Subcontrol: 14.6
    Label: Protect Information through Access Control Lists
    Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
  • >

CIS Critical Security Controls V8.0:

  • Control 3: Data Protection: -- More
    CIS Control Information
    Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
    Safeguard: 3.3
    Label: Configure Data Access Control Lists
    Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
    Implementation Group: IG-1
    Security Function: Protect
  • >

Pass

1.1.2.4 Ensure nosuid option set on /tmp partition

Description:

The nosuid mount option specifies that the filesystem cannot contain setuid files.

Since the /tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot create setuid files in /tmp .

Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the /tmp partition.

Example:

<device> /tmp <fstype> defaults,rw,nosuid,nodev,noexec,relatime 0 0

Run the following command to remount /tmp with the configured options:

# mount -o remount /tmp

Show Assessment Evidence
Complex Check
AND
Criterion: Ensure partition at /tmp may exists and all have at least one partition option equals 'nosuid' (string)
Existence Check: Any Exist
Item Check: All
Result: Pass
No matching system items were found.


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.1.2.4_Ensure_nosuid_option_set_on_tmp_partition"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.852-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>pass</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">See the fstab(5) manual page for more information.</xccdf:ident>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3, MP-2</xccdf:ident>
   <xccdf:complex-check operator="AND" negate="false">
      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                   negate="false"
                   multi-check="false">
         <xccdf:check-content-ref href="#OVAL-Results-1"
                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994888"/>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="definition"
                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994888">
               <div class="criteria">
                  <div class="criterion"
                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994888"
                       check="all"
                       check_existence="any_exist">
                     <table class="evidence-sep" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Criterion:</td>
                              <td>Ensure partition at /tmp may exists and all have at least one partition option equals 'nosuid' (string)</td>
                           </tr>
                           <tr>
                              <td class="bold">Existence Check:</td>
                              <td>Any Exist</td>
                           </tr>
                           <tr>
                              <td class="bold">Item Check:</td>
                              <td>All</td>
                           </tr>
                           <tr>
                              <td class="bold">Result:</td>
                              <td class="pass">Pass</td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <tr>
                           <td>No matching system items were found.</td>
                        </tr>
                     </table>
                  </div>
               </div>
            </div>
         </evidence>
      </xccdf:check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

  • URL: See the fstab(5) manual page for more information.
  • URL: NIST SP 800-53 Rev. 5: AC-3, MP-2

CIS Controls V7.0:

  • Control 14: Controlled Access Based on the Need to Know: -- More
    CIS Control Information
    Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
    Subcontrol: 14.6
    Label: Protect Information through Access Control Lists
    Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
  • >

CIS Critical Security Controls V8.0:

  • Control 3: Data Protection: -- More
    CIS Control Information
    Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
    Safeguard: 3.3
    Label: Configure Data Access Control Lists
    Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
    Implementation Group: IG-1
    Security Function: Protect
  • >

1.1.3 Configure /var

The /var directory is used by daemons and other system services to temporarily store dynamic data. Some directories created by these processes may be world-writable.

Pass

1.1.3.2 Ensure nodev option set on /var partition

Description:

The nodev mount option specifies that the filesystem cannot contain special devices.

Since the /var filesystem is not intended to support devices, set this option to ensure that users cannot create block or character special devices in /var .

IF the /var partition exists, edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /var partition.

Example:

<device> /var <fstype> defaults,rw,nosuid,nodev,relatime 0 0

Run the following command to remount /var with the configured options:

# mount -o remount /var

Show Assessment Evidence
Complex Check
AND
Criterion: Ensure partition at /var may exists and all have at least one partition option equals 'nodev' (string)
Existence Check: Any Exist
Item Check: All
Result: Pass
No matching system items were found.


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.1.3.2_Ensure_nodev_option_set_on_var_partition"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.853-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>pass</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">See the fstab(5) manual page for more information.</xccdf:ident>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3, MP-2</xccdf:ident>
   <xccdf:complex-check operator="AND" negate="false">
      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                   negate="false"
                   multi-check="false">
         <xccdf:check-content-ref href="#OVAL-Results-1"
                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994892"/>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="definition"
                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994892">
               <div class="criteria">
                  <div class="criterion"
                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994892"
                       check="all"
                       check_existence="any_exist">
                     <table class="evidence-sep" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Criterion:</td>
                              <td>Ensure partition at /var may exists and all have at least one partition option equals 'nodev' (string)</td>
                           </tr>
                           <tr>
                              <td class="bold">Existence Check:</td>
                              <td>Any Exist</td>
                           </tr>
                           <tr>
                              <td class="bold">Item Check:</td>
                              <td>All</td>
                           </tr>
                           <tr>
                              <td class="bold">Result:</td>
                              <td class="pass">Pass</td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <tr>
                           <td>No matching system items were found.</td>
                        </tr>
                     </table>
                  </div>
               </div>
            </div>
         </evidence>
      </xccdf:check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

  • URL: See the fstab(5) manual page for more information.
  • URL: NIST SP 800-53 Rev. 5: AC-3, MP-2

CIS Controls V7.0:

  • Control 14: Controlled Access Based on the Need to Know: -- More
    CIS Control Information
    Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
    Subcontrol: 14.6
    Label: Protect Information through Access Control Lists
    Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
  • >

CIS Critical Security Controls V8.0:

  • Control 3: Data Protection: -- More
    CIS Control Information
    Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
    Safeguard: 3.3
    Label: Configure Data Access Control Lists
    Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
    Implementation Group: IG-1
    Security Function: Protect
  • >

Pass

1.1.3.3 Ensure nosuid option set on /var partition

Description:

The nosuid mount option specifies that the filesystem cannot contain setuid files.

Since the /var filesystem is only intended for variable files such as logs, set this option to ensure that users cannot create setuid files in /var .

IF the /var partition exists, edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the /var partition.

Example:

<device> /var <fstype> defaults,rw,nosuid,nodev,relatime 0 0

Run the following command to remount /var with the configured options:

# mount -o remount /var

Show Assessment Evidence
Complex Check
AND
Criterion: Ensure partition at /var may exists{else}exists and all
Existence Check: Any Exist
Item Check: All
Result: Pass
No matching system items were found.


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.1.3.3_Ensure_nosuid_option_set_on_var_partition"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.853-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>pass</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">See the fstab(5) manual page for more information.</xccdf:ident>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3, MP-2</xccdf:ident>
   <xccdf:complex-check operator="AND" negate="false">
      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                   negate="false"
                   multi-check="false">
         <xccdf:check-content-ref href="#OVAL-Results-1"
                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994895"/>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="definition"
                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994895">
               <div class="criteria">
                  <div class="criterion"
                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994895"
                       check="all"
                       check_existence="any_exist">
                     <table class="evidence-sep" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Criterion:</td>
                              <td>Ensure partition at /var may exists{else}exists and all</td>
                           </tr>
                           <tr>
                              <td class="bold">Existence Check:</td>
                              <td>Any Exist</td>
                           </tr>
                           <tr>
                              <td class="bold">Item Check:</td>
                              <td>All</td>
                           </tr>
                           <tr>
                              <td class="bold">Result:</td>
                              <td class="pass">Pass</td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <tr>
                           <td>No matching system items were found.</td>
                        </tr>
                     </table>
                  </div>
               </div>
            </div>
         </evidence>
      </xccdf:check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

  • URL: See the fstab(5) manual page for more information.
  • URL: NIST SP 800-53 Rev. 5: AC-3, MP-2

CIS Controls V7.0:

  • Control 14: Controlled Access Based on the Need to Know: -- More
    CIS Control Information
    Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
    Subcontrol: 14.6
    Label: Protect Information through Access Control Lists
    Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
  • >

CIS Critical Security Controls V8.0:

  • Control 3: Data Protection: -- More
    CIS Control Information
    Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
    Safeguard: 3.3
    Label: Configure Data Access Control Lists
    Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
    Implementation Group: IG-1
    Security Function: Protect
  • >

1.1.4 Configure /var/tmp

The /var/tmp directory is a world-writable directory used for temporary storage by all users and some applications. Temporary files residing in /var/tmp are to be preserved between reboots.

Pass

1.1.4.2 Ensure nodev option set on /var/tmp partition

Description:

The nodev mount option specifies that the filesystem cannot contain special devices.

Since the /var/tmp filesystem is not intended to support devices, set this option to ensure that users cannot create block or character special devices in /var/tmp .

IF the /var/tmp partition exists, edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /var/tmp partition.

Example:

<device> /var/tmp <fstype> defaults,rw,nosuid,nodev,noexec,relatime 0 0

Run the following command to remount /var/tmp with the configured options:

# mount -o remount /var/tmp

Show Assessment Evidence
Complex Check
AND
Criterion: Ensure partition at /var/tmp may exists{else}exists and all
Existence Check: Any Exist
Item Check: All
Result: Pass
No matching system items were found.


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.1.4.2_Ensure_nodev_option_set_on_vartmp_partition"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.853-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>pass</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">See the fstab(5) manual page for more information.</xccdf:ident>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3, MP-2</xccdf:ident>
   <xccdf:complex-check operator="AND" negate="false">
      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                   negate="false"
                   multi-check="false">
         <xccdf:check-content-ref href="#OVAL-Results-1"
                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994900"/>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="definition"
                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994900">
               <div class="criteria">
                  <div class="criterion"
                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994900"
                       check="all"
                       check_existence="any_exist">
                     <table class="evidence-sep" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Criterion:</td>
                              <td>Ensure partition at /var/tmp may exists{else}exists and all</td>
                           </tr>
                           <tr>
                              <td class="bold">Existence Check:</td>
                              <td>Any Exist</td>
                           </tr>
                           <tr>
                              <td class="bold">Item Check:</td>
                              <td>All</td>
                           </tr>
                           <tr>
                              <td class="bold">Result:</td>
                              <td class="pass">Pass</td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <tr>
                           <td>No matching system items were found.</td>
                        </tr>
                     </table>
                  </div>
               </div>
            </div>
         </evidence>
      </xccdf:check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

  • URL: See the fstab(5) manual page for more information.
  • URL: NIST SP 800-53 Rev. 5: AC-3, MP-2

CIS Controls V7.0:

  • Control 14: Controlled Access Based on the Need to Know: -- More
    CIS Control Information
    Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
    Subcontrol: 14.6
    Label: Protect Information through Access Control Lists
    Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
  • >

CIS Critical Security Controls V8.0:

  • Control 3: Data Protection: -- More
    CIS Control Information
    Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
    Safeguard: 3.3
    Label: Configure Data Access Control Lists
    Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
    Implementation Group: IG-1
    Security Function: Protect
  • >

Pass

1.1.4.3 Ensure noexec option set on /var/tmp partition

Description:

The noexec mount option specifies that the filesystem cannot contain executable binaries.

Since the /var/tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot run executable binaries from /var/tmp .

IF the /var/tmp partition exists, edit the /etc/fstab file and add noexec to the fourth field (mounting options) for the /var/tmp partition.

Example:

<device> /var/tmp <fstype> defaults,rw,nosuid,nodev,noexec,relatime 0 0

Run the following command to remount /var/tmp with the configured options:

# mount -o remount /var/tmp

Show Assessment Evidence
Complex Check
AND
Criterion: Ensure partition at /var/tmp may exists{else}exists and all
Existence Check: Any Exist
Item Check: All
Result: Pass
No matching system items were found.


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.1.4.3_Ensure_noexec_option_set_on_vartmp_partition"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.853-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>pass</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">See the fstab(5) manual page for more information.</xccdf:ident>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3, MP-2</xccdf:ident>
   <xccdf:complex-check operator="AND" negate="false">
      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                   negate="false"
                   multi-check="false">
         <xccdf:check-content-ref href="#OVAL-Results-1"
                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994902"/>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="definition"
                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994902">
               <div class="criteria">
                  <div class="criterion"
                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994902"
                       check="all"
                       check_existence="any_exist">
                     <table class="evidence-sep" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Criterion:</td>
                              <td>Ensure partition at /var/tmp may exists{else}exists and all</td>
                           </tr>
                           <tr>
                              <td class="bold">Existence Check:</td>
                              <td>Any Exist</td>
                           </tr>
                           <tr>
                              <td class="bold">Item Check:</td>
                              <td>All</td>
                           </tr>
                           <tr>
                              <td class="bold">Result:</td>
                              <td class="pass">Pass</td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <tr>
                           <td>No matching system items were found.</td>
                        </tr>
                     </table>
                  </div>
               </div>
            </div>
         </evidence>
      </xccdf:check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

  • URL: See the fstab(5) manual page for more information.
  • URL: NIST SP 800-53 Rev. 5: AC-3, MP-2

CIS Controls V7.0:

  • Control 14: Controlled Access Based on the Need to Know: -- More
    CIS Control Information
    Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
    Subcontrol: 14.6
    Label: Protect Information through Access Control Lists
    Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
  • >

CIS Critical Security Controls V8.0:

  • Control 3: Data Protection: -- More
    CIS Control Information
    Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
    Safeguard: 3.3
    Label: Configure Data Access Control Lists
    Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
    Implementation Group: IG-1
    Security Function: Protect
  • >

Pass

1.1.4.4 Ensure nosuid option set on /var/tmp partition

Description:

The nosuid mount option specifies that the filesystem cannot contain setuid files.

Since the /var/tmp filesystem is only intended for temporary file storage, set this option to ensure that users cannot create setuid files in /var/tmp .

IF the /var/tmp partition exists, edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the /var/tmp partition.

Example:

<device> /var/tmp <fstype> defaults,rw,nosuid,nodev,noexec,relatime 0 0

Run the following command to remount /var/tmp with the configured options:

# mount -o remount /var/tmp

Show Assessment Evidence
Complex Check
AND
Criterion: Ensure partition at /var/tmp may exists{else}exists and all
Existence Check: Any Exist
Item Check: All
Result: Pass
No matching system items were found.


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.1.4.4_Ensure_nosuid_option_set_on_vartmp_partition"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.853-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>pass</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">See the fstab(5) manual page for more information.</xccdf:ident>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3, MP-2</xccdf:ident>
   <xccdf:complex-check operator="AND" negate="false">
      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                   negate="false"
                   multi-check="false">
         <xccdf:check-content-ref href="#OVAL-Results-1"
                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994905"/>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="definition"
                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994905">
               <div class="criteria">
                  <div class="criterion"
                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994905"
                       check="all"
                       check_existence="any_exist">
                     <table class="evidence-sep" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Criterion:</td>
                              <td>Ensure partition at /var/tmp may exists{else}exists and all</td>
                           </tr>
                           <tr>
                              <td class="bold">Existence Check:</td>
                              <td>Any Exist</td>
                           </tr>
                           <tr>
                              <td class="bold">Item Check:</td>
                              <td>All</td>
                           </tr>
                           <tr>
                              <td class="bold">Result:</td>
                              <td class="pass">Pass</td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <tr>
                           <td>No matching system items were found.</td>
                        </tr>
                     </table>
                  </div>
               </div>
            </div>
         </evidence>
      </xccdf:check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

  • URL: See the fstab(5) manual page for more information.
  • URL: NIST SP 800-53 Rev. 5: AC-3, MP-2

CIS Controls V7.0:

  • Control 14: Controlled Access Based on the Need to Know: -- More
    CIS Control Information
    Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
    Subcontrol: 14.6
    Label: Protect Information through Access Control Lists
    Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
  • >

CIS Critical Security Controls V8.0:

  • Control 3: Data Protection: -- More
    CIS Control Information
    Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
    Safeguard: 3.3
    Label: Configure Data Access Control Lists
    Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
    Implementation Group: IG-1
    Security Function: Protect
  • >

1.1.5 Configure /var/log

The /var/log directory is used by system services to store log data.

Pass

1.1.5.2 Ensure nodev option set on /var/log partition

Description:

The nodev mount option specifies that the filesystem cannot contain special devices.

Since the /var/log filesystem is not intended to support devices, set this option to ensure that users cannot create block or character special devices in /var/log .

IF the /var/log partition exists, edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /var/log partition.

Example:

<device> /var/log <fstype> defaults,rw,nosuid,nodev,noexec,relatime 0 0

Run the following command to remount /var/log with the configured options:

# mount -o remount /var/log

Show Assessment Evidence
Complex Check
AND
Criterion: Ensure partition at /var/log may exists and all have at least one partition option equals 'nodev' (string)
Existence Check: Any Exist
Item Check: All
Result: Pass
No matching system items were found.


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.1.5.2_Ensure_nodev_option_set_on_varlog_partition"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.854-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>pass</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">See the fstab(5) manual page for more information.</xccdf:ident>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3, MP-2</xccdf:ident>
   <xccdf:complex-check operator="AND" negate="false">
      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                   negate="false"
                   multi-check="false">
         <xccdf:check-content-ref href="#OVAL-Results-1"
                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994909"/>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="definition"
                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994909">
               <div class="criteria">
                  <div class="criterion"
                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994909"
                       check="all"
                       check_existence="any_exist">
                     <table class="evidence-sep" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Criterion:</td>
                              <td>Ensure partition at /var/log may exists and all have at least one partition option equals 'nodev' (string)</td>
                           </tr>
                           <tr>
                              <td class="bold">Existence Check:</td>
                              <td>Any Exist</td>
                           </tr>
                           <tr>
                              <td class="bold">Item Check:</td>
                              <td>All</td>
                           </tr>
                           <tr>
                              <td class="bold">Result:</td>
                              <td class="pass">Pass</td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <tr>
                           <td>No matching system items were found.</td>
                        </tr>
                     </table>
                  </div>
               </div>
            </div>
         </evidence>
      </xccdf:check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

  • URL: See the fstab(5) manual page for more information.
  • URL: NIST SP 800-53 Rev. 5: AC-3, MP-2

CIS Controls V7.0:

  • Control 14: Controlled Access Based on the Need to Know: -- More
    CIS Control Information
    Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
    Subcontrol: 14.6
    Label: Protect Information through Access Control Lists
    Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
  • >

CIS Critical Security Controls V8.0:

  • Control 3: Data Protection: -- More
    CIS Control Information
    Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
    Safeguard: 3.3
    Label: Configure Data Access Control Lists
    Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
    Implementation Group: IG-1
    Security Function: Protect
  • >

Pass

1.1.5.3 Ensure noexec option set on /var/log partition

Description:

The noexec mount option specifies that the filesystem cannot contain executable binaries.

Since the /var/log filesystem is only intended for log files, set this option to ensure that users cannot run executable binaries from /var/log .

IF the /var/log partition exists, edit the /etc/fstab file and add noexec to the fourth field (mounting options) for the /var/log partition.

Example:

<device> /var/log <fstype> defaults,rw,nosuid,nodev,noexec,relatime 0 0

Run the following command to remount /var/log with the configured options:

# mount -o remount /var/log

Show Assessment Evidence
Complex Check
AND
Criterion: Ensure partition at /var/log may exists{else}exists and all
Existence Check: Any Exist
Item Check: All
Result: Pass
No matching system items were found.


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.1.5.3_Ensure_noexec_option_set_on_varlog_partition"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.854-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>pass</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">See the fstab(5) manual page for more information.</xccdf:ident>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3, MP-2</xccdf:ident>
   <xccdf:complex-check operator="AND" negate="false">
      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                   negate="false"
                   multi-check="false">
         <xccdf:check-content-ref href="#OVAL-Results-1"
                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994912"/>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="definition"
                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994912">
               <div class="criteria">
                  <div class="criterion"
                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994912"
                       check="all"
                       check_existence="any_exist">
                     <table class="evidence-sep" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Criterion:</td>
                              <td>Ensure partition at /var/log may exists{else}exists and all</td>
                           </tr>
                           <tr>
                              <td class="bold">Existence Check:</td>
                              <td>Any Exist</td>
                           </tr>
                           <tr>
                              <td class="bold">Item Check:</td>
                              <td>All</td>
                           </tr>
                           <tr>
                              <td class="bold">Result:</td>
                              <td class="pass">Pass</td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <tr>
                           <td>No matching system items were found.</td>
                        </tr>
                     </table>
                  </div>
               </div>
            </div>
         </evidence>
      </xccdf:check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

  • URL: See the fstab(5) manual page for more information.
  • URL: NIST SP 800-53 Rev. 5: AC-3, MP-2

CIS Controls V7.0:

  • Control 14: Controlled Access Based on the Need to Know: -- More
    CIS Control Information
    Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
    Subcontrol: 14.6
    Label: Protect Information through Access Control Lists
    Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
  • >

CIS Critical Security Controls V8.0:

  • Control 3: Data Protection: -- More
    CIS Control Information
    Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
    Safeguard: 3.3
    Label: Configure Data Access Control Lists
    Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
    Implementation Group: IG-1
    Security Function: Protect
  • >

Pass

1.1.5.4 Ensure nosuid option set on /var/log partition

Description:

The nosuid mount option specifies that the filesystem cannot contain setuid files.

Since the /var/log filesystem is only intended for log files, set this option to ensure that users cannot create setuid files in /var/log .

IF the /var/log partition exists, edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the /var/log partition.

Example:

<device> /var/log <fstype> defaults,rw,nosuid,nodev,noexec,relatime 0 0

Run the following command to remount /var/log with the configured options:

# mount -o remount /var/log

Show Assessment Evidence
Complex Check
AND
Criterion: Ensure partition at /var/log may exists{else}exists and all
Existence Check: Any Exist
Item Check: All
Result: Pass
No matching system items were found.


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.1.5.4_Ensure_nosuid_option_set_on_varlog_partition"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.854-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>pass</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">See the fstab(5) manual page for more information.</xccdf:ident>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3, MP-2</xccdf:ident>
   <xccdf:complex-check operator="AND" negate="false">
      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                   negate="false"
                   multi-check="false">
         <xccdf:check-content-ref href="#OVAL-Results-1"
                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994916"/>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="definition"
                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994916">
               <div class="criteria">
                  <div class="criterion"
                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994916"
                       check="all"
                       check_existence="any_exist">
                     <table class="evidence-sep" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Criterion:</td>
                              <td>Ensure partition at /var/log may exists{else}exists and all</td>
                           </tr>
                           <tr>
                              <td class="bold">Existence Check:</td>
                              <td>Any Exist</td>
                           </tr>
                           <tr>
                              <td class="bold">Item Check:</td>
                              <td>All</td>
                           </tr>
                           <tr>
                              <td class="bold">Result:</td>
                              <td class="pass">Pass</td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <tr>
                           <td>No matching system items were found.</td>
                        </tr>
                     </table>
                  </div>
               </div>
            </div>
         </evidence>
      </xccdf:check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

  • URL: See the fstab(5) manual page for more information.
  • URL: NIST SP 800-53 Rev. 5: AC-3, MP-2

CIS Controls V7.0:

  • Control 14: Controlled Access Based on the Need to Know: -- More
    CIS Control Information
    Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
    Subcontrol: 14.6
    Label: Protect Information through Access Control Lists
    Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
  • >

CIS Critical Security Controls V8.0:

  • Control 3: Data Protection: -- More
    CIS Control Information
    Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
    Safeguard: 3.3
    Label: Configure Data Access Control Lists
    Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
    Implementation Group: IG-1
    Security Function: Protect
  • >

1.1.6 Configure /var/log/audit

The auditing daemon, auditd , stores log data in the /var/log/audit directory.

Pass

1.1.6.2 Ensure nodev option set on /var/log/audit partition

Description:

The nodev mount option specifies that the filesystem cannot contain special devices.

Since the /var/log/audit filesystem is not intended to support devices, set this option to ensure that users cannot create block or character special devices in /var/log/audit .

IF the /var/log/audit partition exists, edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /var/log/audit partition.

Example:

<device> /var/log/audit <fstype> defaults,rw,nosuid,nodev,noexec,relatime 0 0

Run the following command to remount /var/log/audit with the configured options:

# mount -o remount /var/log/audit

Show Assessment Evidence
Complex Check
AND
Criterion: Ensure partition at /var/log/audit may exists and all have at least one partition option equals 'nodev' (string)
Existence Check: Any Exist
Item Check: All
Result: Pass
No matching system items were found.


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.1.6.2_Ensure_nodev_option_set_on_varlogaudit_partition"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.854-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>pass</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">See the fstab(5) manual page for more information.</xccdf:ident>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3, MP-2</xccdf:ident>
   <xccdf:complex-check operator="AND" negate="false">
      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                   negate="false"
                   multi-check="false">
         <xccdf:check-content-ref href="#OVAL-Results-1"
                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994922"/>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="definition"
                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994922">
               <div class="criteria">
                  <div class="criterion"
                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994922"
                       check="all"
                       check_existence="any_exist">
                     <table class="evidence-sep" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Criterion:</td>
                              <td>Ensure partition at /var/log/audit may exists and all have at least one partition option equals 'nodev' (string)</td>
                           </tr>
                           <tr>
                              <td class="bold">Existence Check:</td>
                              <td>Any Exist</td>
                           </tr>
                           <tr>
                              <td class="bold">Item Check:</td>
                              <td>All</td>
                           </tr>
                           <tr>
                              <td class="bold">Result:</td>
                              <td class="pass">Pass</td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <tr>
                           <td>No matching system items were found.</td>
                        </tr>
                     </table>
                  </div>
               </div>
            </div>
         </evidence>
      </xccdf:check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

  • URL: See the fstab(5) manual page for more information.
  • URL: NIST SP 800-53 Rev. 5: AC-3, MP-2

CIS Controls V7.0:

  • Control 14: Controlled Access Based on the Need to Know: -- More
    CIS Control Information
    Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
    Subcontrol: 14.6
    Label: Protect Information through Access Control Lists
    Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
  • >

CIS Critical Security Controls V8.0:

  • Control 3: Data Protection: -- More
    CIS Control Information
    Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
    Safeguard: 3.3
    Label: Configure Data Access Control Lists
    Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
    Implementation Group: IG-1
    Security Function: Protect
  • >

Pass

1.1.6.3 Ensure noexec option set on /var/log/audit partition

Description:

The noexec mount option specifies that the filesystem cannot contain executable binaries.

Since the /var/log/audit filesystem is only intended for audit logs, set this option to ensure that users cannot run executable binaries from /var/log/audit .

IF the /var/log/audit partition exists, edit the /etc/fstab file and add noexec to the fourth field (mounting options) for the /var partition.

Example:

<device> /var/log/audit <fstype> defaults,rw,nosuid,nodev,noexec,relatime 0 0

Run the following command to remount /var/log/audit with the configured options:

# mount -o remount /var/log/audit

Show Assessment Evidence
Complex Check
AND
Criterion: Ensure partition at /var/log/audit may exists{else}exists and all
Existence Check: Any Exist
Item Check: All
Result: Pass
No matching system items were found.


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.1.6.3_Ensure_noexec_option_set_on_varlogaudit_partition"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.854-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>pass</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">See the fstab(5) manual page for more information.</xccdf:ident>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-11</xccdf:ident>
   <xccdf:complex-check operator="AND" negate="false">
      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                   negate="false"
                   multi-check="false">
         <xccdf:check-content-ref href="#OVAL-Results-1"
                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994925"/>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="definition"
                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994925">
               <div class="criteria">
                  <div class="criterion"
                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994925"
                       check="all"
                       check_existence="any_exist">
                     <table class="evidence-sep" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Criterion:</td>
                              <td>Ensure partition at /var/log/audit may exists{else}exists and all</td>
                           </tr>
                           <tr>
                              <td class="bold">Existence Check:</td>
                              <td>Any Exist</td>
                           </tr>
                           <tr>
                              <td class="bold">Item Check:</td>
                              <td>All</td>
                           </tr>
                           <tr>
                              <td class="bold">Result:</td>
                              <td class="pass">Pass</td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <tr>
                           <td>No matching system items were found.</td>
                        </tr>
                     </table>
                  </div>
               </div>
            </div>
         </evidence>
      </xccdf:check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

  • URL: See the fstab(5) manual page for more information.
  • URL: NIST SP 800-53 Rev. 5: CM-11

CIS Controls V7.0:

  • Control 14: Controlled Access Based on the Need to Know: -- More
    CIS Control Information
    Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
    Subcontrol: 14.6
    Label: Protect Information through Access Control Lists
    Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
  • >

CIS Critical Security Controls V8.0:

  • Control 3: Data Protection: -- More
    CIS Control Information
    Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
    Safeguard: 3.3
    Label: Configure Data Access Control Lists
    Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
    Implementation Group: IG-1
    Security Function: Protect
  • >

Pass

1.1.6.4 Ensure nosuid option set on /var/log/audit partition

Description:

The nosuid mount option specifies that the filesystem cannot contain setuid files.

Since the /var/log/audit filesystem is only intended for variable files such as logs, set this option to ensure that users cannot create setuid files in /var/log/audit .

IF the /var/log/audit partition exists, edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the /var/log/audit partition.

Example:

<device> /var/log/audit <fstype> defaults,rw,nosuid,nodev,noexec,relatime 0 0

Run the following command to remount /var/log/audit with the configured options:

# mount -o remount /var/log/audit

Show Assessment Evidence
Complex Check
AND
Criterion: Ensure partition at /var/log/audit may exists{else}exists and all
Existence Check: Any Exist
Item Check: All
Result: Pass
No matching system items were found.


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.1.6.4_Ensure_nosuid_option_set_on_varlogaudit_partition"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.854-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>pass</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">See the fstab(5) manual page for more information.</xccdf:ident>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-6</xccdf:ident>
   <xccdf:complex-check operator="AND" negate="false">
      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                   negate="false"
                   multi-check="false">
         <xccdf:check-content-ref href="#OVAL-Results-1"
                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994929"/>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="definition"
                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994929">
               <div class="criteria">
                  <div class="criterion"
                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994929"
                       check="all"
                       check_existence="any_exist">
                     <table class="evidence-sep" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Criterion:</td>
                              <td>Ensure partition at /var/log/audit may exists{else}exists and all</td>
                           </tr>
                           <tr>
                              <td class="bold">Existence Check:</td>
                              <td>Any Exist</td>
                           </tr>
                           <tr>
                              <td class="bold">Item Check:</td>
                              <td>All</td>
                           </tr>
                           <tr>
                              <td class="bold">Result:</td>
                              <td class="pass">Pass</td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <tr>
                           <td>No matching system items were found.</td>
                        </tr>
                     </table>
                  </div>
               </div>
            </div>
         </evidence>
      </xccdf:check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

  • URL: See the fstab(5) manual page for more information.
  • URL: NIST SP 800-53 Rev. 5: CM-6

CIS Controls V7.0:

  • Control 14: Controlled Access Based on the Need to Know: -- More
    CIS Control Information
    Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
    Subcontrol: 14.6
    Label: Protect Information through Access Control Lists
    Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
  • >

CIS Critical Security Controls V8.0:

  • Control 3: Data Protection: -- More
    CIS Control Information
    Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
    Safeguard: 3.3
    Label: Configure Data Access Control Lists
    Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
    Implementation Group: IG-1
    Security Function: Protect
  • >

1.1.7 Configure /home

Please note that home directories could be mounted anywhere and are not necessarily restricted to /home nor restricted to a single location, nor is the name restricted in any way.

Checks can be made by looking in /etc/passwd , looking over the mounted file systems with mount or querying the relevant database with getent .

Pass

1.1.7.2 Ensure nodev option set on /home partition

Description:

The nodev mount option specifies that the filesystem cannot contain special devices.

Since the /home filesystem is not intended to support devices, set this option to ensure that users cannot create block or character special devices in /home .

IF the /home partition exists, edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /home partition.

Example:

<device> /home <fstype> defaults,rw,nosuid,nodev,relatime 0 0

Run the following command to remount /home with the configured options:

# mount -o remount /home

Show Assessment Evidence
Complex Check
AND
Criterion: Ensure partition at /home may exists{else}exists and all
Existence Check: Any Exist
Item Check: All
Result: Pass
No matching system items were found.


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.1.7.2_Ensure_nodev_option_set_on_home_partition"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.854-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>pass</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">See the fstab(5) manual page for more information.</xccdf:ident>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3. MP-2</xccdf:ident>
   <xccdf:complex-check operator="AND" negate="false">
      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                   negate="false"
                   multi-check="false">
         <xccdf:check-content-ref href="#OVAL-Results-1"
                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994935"/>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="definition"
                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994935">
               <div class="criteria">
                  <div class="criterion"
                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994935"
                       check="all"
                       check_existence="any_exist">
                     <table class="evidence-sep" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Criterion:</td>
                              <td>Ensure partition at /home may exists{else}exists and all</td>
                           </tr>
                           <tr>
                              <td class="bold">Existence Check:</td>
                              <td>Any Exist</td>
                           </tr>
                           <tr>
                              <td class="bold">Item Check:</td>
                              <td>All</td>
                           </tr>
                           <tr>
                              <td class="bold">Result:</td>
                              <td class="pass">Pass</td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <tr>
                           <td>No matching system items were found.</td>
                        </tr>
                     </table>
                  </div>
               </div>
            </div>
         </evidence>
      </xccdf:check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

  • URL: See the fstab(5) manual page for more information.
  • URL: NIST SP 800-53 Rev. 5: AC-3. MP-2

CIS Controls V7.0:

  • Control 14: Controlled Access Based on the Need to Know: -- More
    CIS Control Information
    Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
    Subcontrol: 14.6
    Label: Protect Information through Access Control Lists
    Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
  • >

CIS Critical Security Controls V8.0:

  • Control 3: Data Protection: -- More
    CIS Control Information
    Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
    Safeguard: 3.3
    Label: Configure Data Access Control Lists
    Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
    Implementation Group: IG-1
    Security Function: Protect
  • >

Pass

1.1.7.3 Ensure nosuid option set on /home partition

Description:

The nosuid mount option specifies that the filesystem cannot contain setuid files.

Since the /home filesystem is only intended for user file storage, set this option to ensure that users cannot create setuid files in /home .

IF the /home partition exists, edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the /home partition.

Example:

<device> /home <fstype> defaults,rw,nosuid,nodev,relatime 0 0

Run the following command to remount /home with the configured options:

# mount -o remount /home

Show Assessment Evidence
Complex Check
AND
Criterion: Ensure partition at /home may exists and all have at least one partition option equals 'nosuid' (string)
Existence Check: Any Exist
Item Check: All
Result: Pass
No matching system items were found.


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.1.7.3_Ensure_nosuid_option_set_on_home_partition"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.854-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>pass</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">See the fstab(5) manual page for more information.</xccdf:ident>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3, MP-2</xccdf:ident>
   <xccdf:complex-check operator="AND" negate="false">
      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                   negate="false"
                   multi-check="false">
         <xccdf:check-content-ref href="#OVAL-Results-1"
                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994939"/>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="definition"
                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994939">
               <div class="criteria">
                  <div class="criterion"
                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994939"
                       check="all"
                       check_existence="any_exist">
                     <table class="evidence-sep" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Criterion:</td>
                              <td>Ensure partition at /home may exists and all have at least one partition option equals 'nosuid' (string)</td>
                           </tr>
                           <tr>
                              <td class="bold">Existence Check:</td>
                              <td>Any Exist</td>
                           </tr>
                           <tr>
                              <td class="bold">Item Check:</td>
                              <td>All</td>
                           </tr>
                           <tr>
                              <td class="bold">Result:</td>
                              <td class="pass">Pass</td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <tr>
                           <td>No matching system items were found.</td>
                        </tr>
                     </table>
                  </div>
               </div>
            </div>
         </evidence>
      </xccdf:check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

  • URL: See the fstab(5) manual page for more information.
  • URL: NIST SP 800-53 Rev. 5: AC-3, MP-2

CIS Controls V7.0:

  • Control 14: Controlled Access Based on the Need to Know: -- More
    CIS Control Information
    Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
    Subcontrol: 14.6
    Label: Protect Information through Access Control Lists
    Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
  • >

CIS Critical Security Controls V8.0:

  • Control 3: Data Protection: -- More
    CIS Control Information
    Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
    Safeguard: 3.3
    Label: Configure Data Access Control Lists
    Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
    Implementation Group: IG-1
    Security Function: Protect
  • >

1.1.8 Configure /dev/shm

Pass

1.1.8.1 Ensure nodev option set on /dev/shm partition

Description:

The nodev mount option specifies that the filesystem cannot contain special devices.

Since the /dev/shm filesystem is not intended to support devices, set this option to ensure that users cannot attempt to create special devices in /dev/shm partitions.

Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /dev/shm partition. See the fstab(5) manual page for more information.

Example:

tmpfs /dev/shm tmpfs defaults,rw,nosuid,nodev,noexec,relatime 0 0

Run the following command to remount /dev/shm with the configured options:

# mount -o remount /dev/shm

NOTE It is recommended to use tmpfs as the device/filesystem type as /dev/shm is used as shared memory space by applications.

Show Assessment Evidence
Complex Check
AND
Criterion: Ensure partition at /dev/shm may exists{else}exists and all
Existence Check: Any Exist
Item Check: All
Result: Pass
Partition Item
Name Type Status Value
Mount Point String Exists /dev/shm
Device String Exists shm
Uuid String Does not exist No Value
Fs Type String Exists tmpfs
Mount Options String Exists rw
Mount Options String Exists nosuid
Mount Options String Exists nodev
Mount Options String Exists noexec
Mount Options String Exists relatime
Mount Options String Exists size=65536k
Mount Options String Exists uid=427680
Mount Options String Exists gid=427680
Total Space Int Exists 16384
Space Used Int Exists 0
Space Left Int Exists 16384


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.1.8.1_Ensure_nodev_option_set_on_devshm_partition"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.855-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>pass</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3, MP-2</xccdf:ident>
   <xccdf:complex-check operator="AND" negate="false">
      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                   negate="false"
                   multi-check="false">
         <xccdf:check-content-ref href="#OVAL-Results-1"
                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994943"/>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="definition"
                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994943">
               <div class="criteria">
                  <div class="criterion"
                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994943"
                       check="all"
                       check_existence="any_exist">
                     <table class="evidence-sep" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Criterion:</td>
                              <td>Ensure partition at /dev/shm may exists{else}exists and all</td>
                           </tr>
                           <tr>
                              <td class="bold">Existence Check:</td>
                              <td>Any Exist</td>
                           </tr>
                           <tr>
                              <td class="bold">Item Check:</td>
                              <td>All</td>
                           </tr>
                           <tr>
                              <td class="bold">Result:</td>
                              <td class="pass">Pass</td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <caption>Partition Item</caption>
                        <thead>
                           <tr>
                              <th scope="col">Name</th>
                              <th scope="col">Type</th>
                              <th scope="col">Status</th>
                              <th scope="col">Value</th>
                           </tr>
                        </thead>
                        <tbody class="tbe">
                           <tr>
                              <td>Mount Point</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>/dev/shm</td>
                           </tr>
                           <tr>
                              <td>Device</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>shm</td>
                           </tr>
                           <tr>
                              <td>Uuid</td>
                              <td>String</td>
                              <td>Does not exist</td>
                              <td>No Value</td>
                           </tr>
                           <tr>
                              <td>Fs Type</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>tmpfs</td>
                           </tr>
                           <tr class="evaluated">
                              <td>Mount Options</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>rw</td>
                           </tr>
                           <tr class="evaluated">
                              <td>Mount Options</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>nosuid</td>
                           </tr>
                           <tr class="evaluated">
                              <td>Mount Options</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>nodev</td>
                           </tr>
                           <tr class="evaluated">
                              <td>Mount Options</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>noexec</td>
                           </tr>
                           <tr class="evaluated">
                              <td>Mount Options</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>relatime</td>
                           </tr>
                           <tr class="evaluated">
                              <td>Mount Options</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>size=65536k</td>
                           </tr>
                           <tr class="evaluated">
                              <td>Mount Options</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>uid=427680</td>
                           </tr>
                           <tr class="evaluated">
                              <td>Mount Options</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>gid=427680</td>
                           </tr>
                           <tr>
                              <td>Total Space</td>
                              <td>Int</td>
                              <td>Exists</td>
                              <td>16384</td>
                           </tr>
                           <tr>
                              <td>Space Used</td>
                              <td>Int</td>
                              <td>Exists</td>
                              <td>0</td>
                           </tr>
                           <tr>
                              <td>Space Left</td>
                              <td>Int</td>
                              <td>Exists</td>
                              <td>16384</td>
                           </tr>
                        </tbody>
                     </table>
                  </div>
               </div>
            </div>
         </evidence>
      </xccdf:check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

  • URL: NIST SP 800-53 Rev. 5: AC-3, MP-2

CIS Controls V7.0:

  • Control 14: Controlled Access Based on the Need to Know: -- More
    CIS Control Information
    Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
    Subcontrol: 14.6
    Label: Protect Information through Access Control Lists
    Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
  • >

CIS Critical Security Controls V8.0:

  • Control 3: Data Protection: -- More
    CIS Control Information
    Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
    Safeguard: 3.3
    Label: Configure Data Access Control Lists
    Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
    Implementation Group: IG-1
    Security Function: Protect
  • >

Pass

1.1.8.2 Ensure noexec option set on /dev/shm partition

Description:

The noexec mount option specifies that the filesystem cannot contain executable binaries.

Setting this option on a file system prevents users from executing programs from shared memory. This deters users from introducing potentially malicious software on the system.

Edit the /etc/fstab file and add noexec to the fourth field (mounting options) for the /dev/shm partition.

Example:

tmpfs /dev/shm tmpfs defaults,rw,nosuid,nodev,noexec,relatime 0 0

Run the following command to remount /dev/shm with the configured options:

# mount -o remount /dev/shm

Note: It is recommended to use tmpfs as the device/filesystem type as /dev/shm is used as shared memory space by applications.

Show Assessment Evidence
Complex Check
AND
Criterion: Ensure partition at /dev/shm may exists{else}exists and all
Existence Check: Any Exist
Item Check: All
Result: Pass
Partition Item
Name Type Status Value
Mount Point String Exists /dev/shm
Device String Exists shm
Uuid String Does not exist No Value
Fs Type String Exists tmpfs
Mount Options String Exists rw
Mount Options String Exists nosuid
Mount Options String Exists nodev
Mount Options String Exists noexec
Mount Options String Exists relatime
Mount Options String Exists size=65536k
Mount Options String Exists uid=427680
Mount Options String Exists gid=427680
Total Space Int Exists 16384
Space Used Int Exists 0
Space Left Int Exists 16384


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.1.8.2_Ensure_noexec_option_set_on_devshm_partition"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.855-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>pass</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">See the fstab(5) manual page for more information.</xccdf:ident>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3, MP-2</xccdf:ident>
   <xccdf:complex-check operator="AND" negate="false">
      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                   negate="false"
                   multi-check="false">
         <xccdf:check-content-ref href="#OVAL-Results-1"
                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994946"/>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="definition"
                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994946">
               <div class="criteria">
                  <div class="criterion"
                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994946"
                       check="all"
                       check_existence="any_exist">
                     <table class="evidence-sep" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Criterion:</td>
                              <td>Ensure partition at /dev/shm may exists{else}exists and all</td>
                           </tr>
                           <tr>
                              <td class="bold">Existence Check:</td>
                              <td>Any Exist</td>
                           </tr>
                           <tr>
                              <td class="bold">Item Check:</td>
                              <td>All</td>
                           </tr>
                           <tr>
                              <td class="bold">Result:</td>
                              <td class="pass">Pass</td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <caption>Partition Item</caption>
                        <thead>
                           <tr>
                              <th scope="col">Name</th>
                              <th scope="col">Type</th>
                              <th scope="col">Status</th>
                              <th scope="col">Value</th>
                           </tr>
                        </thead>
                        <tbody class="tbe">
                           <tr>
                              <td>Mount Point</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>/dev/shm</td>
                           </tr>
                           <tr>
                              <td>Device</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>shm</td>
                           </tr>
                           <tr>
                              <td>Uuid</td>
                              <td>String</td>
                              <td>Does not exist</td>
                              <td>No Value</td>
                           </tr>
                           <tr>
                              <td>Fs Type</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>tmpfs</td>
                           </tr>
                           <tr class="evaluated">
                              <td>Mount Options</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>rw</td>
                           </tr>
                           <tr class="evaluated">
                              <td>Mount Options</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>nosuid</td>
                           </tr>
                           <tr class="evaluated">
                              <td>Mount Options</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>nodev</td>
                           </tr>
                           <tr class="evaluated">
                              <td>Mount Options</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>noexec</td>
                           </tr>
                           <tr class="evaluated">
                              <td>Mount Options</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>relatime</td>
                           </tr>
                           <tr class="evaluated">
                              <td>Mount Options</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>size=65536k</td>
                           </tr>
                           <tr class="evaluated">
                              <td>Mount Options</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>uid=427680</td>
                           </tr>
                           <tr class="evaluated">
                              <td>Mount Options</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>gid=427680</td>
                           </tr>
                           <tr>
                              <td>Total Space</td>
                              <td>Int</td>
                              <td>Exists</td>
                              <td>16384</td>
                           </tr>
                           <tr>
                              <td>Space Used</td>
                              <td>Int</td>
                              <td>Exists</td>
                              <td>0</td>
                           </tr>
                           <tr>
                              <td>Space Left</td>
                              <td>Int</td>
                              <td>Exists</td>
                              <td>16384</td>
                           </tr>
                        </tbody>
                     </table>
                  </div>
               </div>
            </div>
         </evidence>
      </xccdf:check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

  • URL: See the fstab(5) manual page for more information.
  • URL: NIST SP 800-53 Rev. 5: AC-3, MP-2

CIS Controls V7.0:

  • Control 14: Controlled Access Based on the Need to Know: -- More
    CIS Control Information
    Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
    Subcontrol: 14.6
    Label: Protect Information through Access Control Lists
    Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
  • >

CIS Critical Security Controls V8.0:

  • Control 3: Data Protection: -- More
    CIS Control Information
    Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
    Safeguard: 3.3
    Label: Configure Data Access Control Lists
    Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
    Implementation Group: IG-1
    Security Function: Protect
  • >

Pass

1.1.8.3 Ensure nosuid option set on /dev/shm partition

Description:

The nosuid mount option specifies that the filesystem cannot contain setuid files.

Setting this option on a file system prevents users from introducing privileged programs onto the system and allowing non-root users to execute them.

Edit the /etc/fstab file and add nosuid to the fourth field (mounting options) for the /dev/shm partition. See the fstab(5) manual page for more information.

Example:

tmpfs /dev/shm tmpfs defaults,rw,nosuid,nodev,noexec,relatime 0 0

Run the following command to remount /dev/shm with the configured options:

# mount -o remount /dev/shm

Note: It is recommended to use tmpfs as the device/filesystem type as /dev/shm is used as shared memory space by applications.

Show Assessment Evidence
Complex Check
AND
Criterion: Ensure partition at /dev/shm may exists{else}exists and all
Existence Check: Any Exist
Item Check: All
Result: Pass
Partition Item
Name Type Status Value
Mount Point String Exists /dev/shm
Device String Exists shm
Uuid String Does not exist No Value
Fs Type String Exists tmpfs
Mount Options String Exists rw
Mount Options String Exists nosuid
Mount Options String Exists nodev
Mount Options String Exists noexec
Mount Options String Exists relatime
Mount Options String Exists size=65536k
Mount Options String Exists uid=427680
Mount Options String Exists gid=427680
Total Space Int Exists 16384
Space Used Int Exists 0
Space Left Int Exists 16384


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.1.8.3_Ensure_nosuid_option_set_on_devshm_partition"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.855-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>pass</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3, MP-2</xccdf:ident>
   <xccdf:complex-check operator="AND" negate="false">
      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                   negate="false"
                   multi-check="false">
         <xccdf:check-content-ref href="#OVAL-Results-1"
                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994949"/>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="definition"
                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994949">
               <div class="criteria">
                  <div class="criterion"
                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994949"
                       check="all"
                       check_existence="any_exist">
                     <table class="evidence-sep" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Criterion:</td>
                              <td>Ensure partition at /dev/shm may exists{else}exists and all</td>
                           </tr>
                           <tr>
                              <td class="bold">Existence Check:</td>
                              <td>Any Exist</td>
                           </tr>
                           <tr>
                              <td class="bold">Item Check:</td>
                              <td>All</td>
                           </tr>
                           <tr>
                              <td class="bold">Result:</td>
                              <td class="pass">Pass</td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <caption>Partition Item</caption>
                        <thead>
                           <tr>
                              <th scope="col">Name</th>
                              <th scope="col">Type</th>
                              <th scope="col">Status</th>
                              <th scope="col">Value</th>
                           </tr>
                        </thead>
                        <tbody class="tbe">
                           <tr>
                              <td>Mount Point</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>/dev/shm</td>
                           </tr>
                           <tr>
                              <td>Device</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>shm</td>
                           </tr>
                           <tr>
                              <td>Uuid</td>
                              <td>String</td>
                              <td>Does not exist</td>
                              <td>No Value</td>
                           </tr>
                           <tr>
                              <td>Fs Type</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>tmpfs</td>
                           </tr>
                           <tr class="evaluated">
                              <td>Mount Options</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>rw</td>
                           </tr>
                           <tr class="evaluated">
                              <td>Mount Options</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>nosuid</td>
                           </tr>
                           <tr class="evaluated">
                              <td>Mount Options</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>nodev</td>
                           </tr>
                           <tr class="evaluated">
                              <td>Mount Options</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>noexec</td>
                           </tr>
                           <tr class="evaluated">
                              <td>Mount Options</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>relatime</td>
                           </tr>
                           <tr class="evaluated">
                              <td>Mount Options</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>size=65536k</td>
                           </tr>
                           <tr class="evaluated">
                              <td>Mount Options</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>uid=427680</td>
                           </tr>
                           <tr class="evaluated">
                              <td>Mount Options</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>gid=427680</td>
                           </tr>
                           <tr>
                              <td>Total Space</td>
                              <td>Int</td>
                              <td>Exists</td>
                              <td>16384</td>
                           </tr>
                           <tr>
                              <td>Space Used</td>
                              <td>Int</td>
                              <td>Exists</td>
                              <td>0</td>
                           </tr>
                           <tr>
                              <td>Space Left</td>
                              <td>Int</td>
                              <td>Exists</td>
                              <td>16384</td>
                           </tr>
                        </tbody>
                     </table>
                  </div>
               </div>
            </div>
         </evidence>
      </xccdf:check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

  • URL: NIST SP 800-53 Rev. 5: AC-3, MP-2

CIS Controls V7.0:

  • Control 14: Controlled Access Based on the Need to Know: -- More
    CIS Control Information
    Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
    Subcontrol: 14.6
    Label: Protect Information through Access Control Lists
    Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
  • >

CIS Critical Security Controls V8.0:

  • Control 3: Data Protection: -- More
    CIS Control Information
    Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
    Safeguard: 3.3
    Label: Configure Data Access Control Lists
    Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
    Implementation Group: IG-1
    Security Function: Protect
  • >

Pass

1.1.9 Disable Automounting

Description:

autofs allows automatic mounting of devices, typically including CD/DVDs and USB drives.

With automounting enabled anyone with physical access could attach a USB drive or disc and have its contents available in the filesystem even if they lacked permissions to mount it themselves.

If there are no other packages that depends on autofs , remove the package with:

# apt purge autofs

-OR- if there are dependencies on the autofs package:

Run the following commands to mask autofs :

# systemctl stop autofs

# systemctl mask autofs

Impact:

The use of portable hard drives is very common for workstation users. If your organization allows the use of portable storage or media on workstations and physical access controls to workstations are considered adequate there is little value add in turning off automounting.

Show Assessment Evidence
Complex Check
OR
Criterion: Ensure systemd 'autofs.service' unit 'UnitFileState' property not equal 'enabled'
Existence Check: At Least One Exists
Item Check: All
Result: Pass
Systemdunitproperty Item
Name Type Status Value
Unit String Exists autofs.service
Property String Exists UnitFileState
Value String Exists No Value
Criterion: Ensure package name equals 'autofs' is not installed
Existence Check: None Exist
Item Check: All
Result: Pass
No matching system items were found.


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.1.9_Disable_Automounting"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.855-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>pass</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/8/subcontrol/5"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/10/subcontrol/3"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: SI-3, MP-7</xccdf:ident>
   <xccdf:complex-check operator="OR" negate="false">
      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                   negate="false"
                   multi-check="false">
         <xccdf:check-export export-name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3994953"
                             value-id="xccdf_org.cisecurity.benchmarks_value_3994953_var"/>
         <xccdf:check-content-ref href="#OVAL-Results-1"
                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994953"/>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="definition"
                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994953">
               <div class="criteria">
                  <div class="criterion"
                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994953"
                       check="all"
                       check_existence="at_least_one_exists">
                     <table class="evidence-sep" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Criterion:</td>
                              <td>Ensure systemd 'autofs.service' unit 'UnitFileState' property not equal 'enabled'</td>
                           </tr>
                           <tr>
                              <td class="bold">Existence Check:</td>
                              <td>At Least One Exists</td>
                           </tr>
                           <tr>
                              <td class="bold">Item Check:</td>
                              <td>All</td>
                           </tr>
                           <tr>
                              <td class="bold">Result:</td>
                              <td class="pass">Pass</td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <caption>Systemdunitproperty Item</caption>
                        <thead>
                           <tr>
                              <th scope="col">Name</th>
                              <th scope="col">Type</th>
                              <th scope="col">Status</th>
                              <th scope="col">Value</th>
                           </tr>
                        </thead>
                        <tbody class="tbe">
                           <tr>
                              <td>Unit</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>autofs.service</td>
                           </tr>
                           <tr>
                              <td>Property</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>UnitFileState</td>
                           </tr>
                           <tr class="evaluated">
                              <td>Value</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>No Value</td>
                           </tr>
                        </tbody>
                     </table>
                  </div>
               </div>
            </div>
         </evidence>
      </xccdf:check>
      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                   negate="false"
                   multi-check="false">
         <xccdf:check-content-ref href="#OVAL-Results-1"
                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994956"/>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="definition"
                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994956">
               <div class="criteria">
                  <div class="criterion"
                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994956"
                       check="all"
                       check_existence="none_exist">
                     <table class="evidence-sep" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Criterion:</td>
                              <td>Ensure package name equals 'autofs' is not installed</td>
                           </tr>
                           <tr>
                              <td class="bold">Existence Check:</td>
                              <td>None Exist</td>
                           </tr>
                           <tr>
                              <td class="bold">Item Check:</td>
                              <td>All</td>
                           </tr>
                           <tr>
                              <td class="bold">Result:</td>
                              <td class="pass">Pass</td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <tr>
                           <td>No matching system items were found.</td>
                        </tr>
                     </table>
                  </div>
               </div>
            </div>
         </evidence>
      </xccdf:check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

  • URL: NIST SP 800-53 Rev. 5: SI-3, MP-7

CIS Controls V7.0:

  • Control 8: Malware Defenses: -- More
    CIS Control Information
    Control: Control the installation, spread, and execution of malicious code at multiple points in the enterprise, while optimizing the use of automation to enable rapid updating of defense, data gathering, and corrective action.
    Subcontrol: 8.5
    Label: Configure Devices Not To Auto-Run Content
    Description: Configure devices to not auto-run content from removable media.
  • >

CIS Critical Security Controls V8.0:

  • Control 10: Malware Defenses: -- More
    CIS Control Information
    Control: Prevent or control the installation, spread, and execution of malicious applications, code, or scripts on enterprise assets.
    Safeguard: 10.3
    Label: Disable Autorun and Autoplay for Removable Media
    Description: Disable autorun and autoplay auto-execute functionality for removable media.
    Implementation Group: IG-1
    Security Function: Protect
  • >

Fail

1.1.10 Disable USB Storage

Description:

USB storage provides a means to transfer and store files insuring persistence and availability of the files independent of network connection status. Its popularity and utility has led to USB-based malware being a simple and common means for network infiltration and a first step to establishing a persistent threat within a networked environment.

Restricting USB access on the system will decrease the physical attack surface for a device and diminish the possible vectors to introduce malware.

Run the following script to disable the cramfs module:

If the module is available in the running kernel:

  • Create a file with install usb-storage /bin/false in the /etc/modprobe.d/ directory
  • Create a file with blacklist usb-storage in the /etc/modprobe.d/ directory
  • Unload usb-storage from the kernel

If available in ANY installed kernel:

  • Create a file with blacklist usb-storage in the /etc/modprobe.d/ directory

If the kernel module is not available on the system:

  • No remediation is necessary
#!/usr/bin/env bash



{

l_mname="usb-storage" # set module name

l_mtype="drivers" # set module type

l_mpath="/lib/modules/**/kernel/$l_mtype"

l_mpname="$(tr '-' '_' <<< "$l_mname")"

l_mndir="$(tr '-' '/' <<< "$l_mname")"



module_loadable_fix()

{

# If the module is currently loadable, add "install {MODULE_NAME} /bin/false" to a file in "/etc/modprobe.d"

l_loadable="$(modprobe -n -v "$l_mname")"

[ "$(wc -l <<< "$l_loadable")" -gt "1" ] && l_loadable="$(grep -P -- "(^\h*install|\b$l_mname)\b" <<< "$l_loadable")"

if ! grep -Pq -- '^\h*install \/bin\/(true|false)' <<< "$l_loadable"; then

echo -e "\n - setting module: \"$l_mname\" to be not loadable"

echo -e "install $l_mname /bin/false" >> /etc/modprobe.d/"$l_mpname".conf

fi

}

module_loaded_fix()

{

# If the module is currently loaded, unload the module

if lsmod | grep "$l_mname" > /dev/null 2>&1; then

echo -e "\n - unloading module \"$l_mname\""

modprobe -r "$l_mname"

fi

}

module_deny_fix()

{

# If the module isn't deny listed, denylist the module

if ! modprobe --showconfig | grep -Pq -- "^\h*blacklist\h+$l_mpname\b"; then

echo -e "\n - deny listing \"$l_mname\""

echo -e "blacklist $l_mname" >> /etc/modprobe.d/"$l_mpname".conf

fi

}

# Check if the module exists on the system

for l_mdir in $l_mpath; do

if [ -d "$l_mdir/$l_mndir" ] && [ -n "$(ls -A $l_mdir/$l_mndir)" ]; then

echo -e "\n - module: \"$l_mname\" exists in \"$l_mdir\"\n - checking if disabled..."

module_deny_fix

if [ "$l_mdir" = "/lib/modules/$(uname -r)/kernel/$l_mtype" ]; then

module_loadable_fix

module_loaded_fix

fi

else

echo -e "\n - module: \"$l_mname\" doesn't exist in \"$l_mdir\"\n"

fi

done

echo -e "\n - remediation of module: \"$l_mname\" complete\n"

}

Impact:

Disabling the usb-storage module will disable any usage of USB storage devices.

If requirements and local site policy allow the use of such devices, other solutions should be configured accordingly instead. One example of a commonly used solution is USBGuard .

Show Assessment Evidence
Complex Check
AND
Script: sce/nix_module_chk_v2.sh
Result: Fail
Exit Value: 102
Output:
  • -- INFO --
  • - module: "usb-storage" exists in:
  • - "/lib/modules/5.4.0-1106-gcp/kernel/drivers"
  • - Audit Result:
  • ** FAIL **
  • - Reason(s) for audit failure:
  • - module: "usb-storage" is not deny listed
  • - module: "usb-storage" is loadable: "insmod /lib/modules/5.4.0-1106-gcp/kernel/drivers/usb/storage/usb-storage.ko "
  • - Correctly set:
  • - module: "usb-storage" is not loaded
No error lines were collected.


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.1.10_Disable_USB_Storage"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.855-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>fail</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/8/subcontrol/5"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/10/subcontrol/3"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/13/subcontrol/7"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: SI-3</xccdf:ident>
   <xccdf:complex-check operator="AND" negate="false">
      <xccdf:check system="http://open-scap.org/page/SCE"
                   negate="false"
                   multi-check="false">
         <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                             value-id="xccdf_org.cisecurity.benchmarks_value_3994958_var"/>
         <xccdf:check-content-ref href="sce/nix_module_chk_v2.sh"/>
         <xccdf:check-content>
            <command_result href="sce/nix_module_chk_v2.sh"
                            xccdf="fail"
                            script="/root/Assessor/sce/nix_module_chk_v2.sh"
                            exit-value="102">
               <out>
                  <l/>
                  <l/>
                  <l> -- INFO --</l>
                  <l> - module: "usb-storage" exists in:</l>
                  <l>  - "/lib/modules/5.4.0-1106-gcp/kernel/drivers"</l>
                  <l/>
                  <l>- Audit Result:</l>
                  <l>  ** FAIL **</l>
                  <l> - Reason(s) for audit failure:</l>
                  <l/>
                  <l> - module: "usb-storage" is not deny listed</l>
                  <l> - module: "usb-storage" is loadable: "insmod /lib/modules/5.4.0-1106-gcp/kernel/drivers/usb/storage/usb-storage.ko "</l>
                  <l/>
                  <l/>
                  <l>- Correctly set:</l>
                  <l/>
                  <l> - module: "usb-storage" is not loaded</l>
                  <l/>
               </out>
               <err/>
               <env/>
            </command_result>
         </xccdf:check-content>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="sce">
               <table class="evidence-sep" width="100%">
                  <tbody class="tbe">
                     <tr>
                        <td class="bold">Script:</td>
                        <td>sce/nix_module_chk_v2.sh</td>
                     </tr>
                     <tr>
                        <td class="bold">Result:</td>
                        <td class="fail">Fail</td>
                     </tr>
                     <tr>
                        <td class="bold">Exit Value:</td>
                        <td>102</td>
                     </tr>
                  </tbody>
               </table>
               <table class="evidence" width="100%">
                  <tbody class="tbe">
                     <tr>
                        <td class="bold">Output:</td>
                        <td>
                           <ul class="unstyled">
                              <li/>
                              <li/>
                              <li> -- INFO --</li>
                              <li> - module: "usb-storage" exists in:</li>
                              <li>  - "/lib/modules/5.4.0-1106-gcp/kernel/drivers"</li>
                              <li/>
                              <li>- Audit Result:</li>
                              <li>  ** FAIL **</li>
                              <li> - Reason(s) for audit failure:</li>
                              <li/>
                              <li> - module: "usb-storage" is not deny listed</li>
                              <li> - module: "usb-storage" is loadable: "insmod /lib/modules/5.4.0-1106-gcp/kernel/drivers/usb/storage/usb-storage.ko "</li>
                              <li/>
                              <li/>
                              <li>- Correctly set:</li>
                              <li/>
                              <li> - module: "usb-storage" is not loaded</li>
                              <li/>
                           </ul>
                        </td>
                     </tr>
                  </tbody>
               </table>
               <table class="evidence" width="100%">
                  <tbody class="tbe">
                     <tr>
                        <td>No error lines were collected.</td>
                     </tr>
                  </tbody>
               </table>
            </div>
         </evidence>
      </xccdf:check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

  • URL: NIST SP 800-53 Rev. 5: SI-3

CIS Controls V7.0:

  • Control 8: Malware Defenses: -- More
    CIS Control Information
    Control: Control the installation, spread, and execution of malicious code at multiple points in the enterprise, while optimizing the use of automation to enable rapid updating of defense, data gathering, and corrective action.
    Subcontrol: 8.5
    Label: Configure Devices Not To Auto-Run Content
    Description: Configure devices to not auto-run content from removable media.
  • Control 13: Data Protection: -- More
    CIS Control Information
    Control: The processes and tools used to prevent data exfiltration, mitigate the effects of exfiltrated data, and ensure the privacy and integrity of sensitive information.
    Subcontrol: 13.7
    Label: Manage USB Devices
    Description: If USB storage devices are required, enterprise software should be used that can configure systems to allow the use of specific devices. An inventory of such devices should be maintained.
  • >

CIS Critical Security Controls V8.0:

  • Control 10: Malware Defenses: -- More
    CIS Control Information
    Control: Prevent or control the installation, spread, and execution of malicious applications, code, or scripts on enterprise assets.
    Safeguard: 10.3
    Label: Disable Autorun and Autoplay for Removable Media
    Description: Disable autorun and autoplay auto-execute functionality for removable media.
    Implementation Group: IG-1
    Security Function: Protect
  • >

1.2 Filesystem Integrity Checking

AIDE is a file integrity checking tool, similar in nature to Tripwire. While it cannot prevent intrusions, it can detect unauthorized changes to configuration files by alerting when the files are changed. When setting up AIDE, decide internally what the site policy will be concerning integrity checking. Review the AIDE quick start guide and AIDE documentation before proceeding.

Fail

1.2.1 Ensure AIDE is installed

Description:

AIDE takes a snapshot of filesystem state including modification times, permissions, and file hashes which can then be used to compare against the current state of the filesystem to detect modifications to the system.

By monitoring the filesystem state compromised files can be detected to prevent or limit the exposure of accidental or malicious misconfigurations or modified binaries.

Install AIDE using the appropriate package manager or manual installation:

# apt install aide aide-common

Configure AIDE as appropriate for your environment. Consult the AIDE documentation for options.

Run the following commands to initialize AIDE:

# aideinit

# mv /var/lib/aide/aide.db.new /var/lib/aide/aide.db

Show Assessment Evidence
Complex Check
AND
Criterion: Ensure package name equals 'aide' is installed
Existence Check: At Least One Exists
Item Check: All
Result: Fail
No matching system items were found.
Criterion: Ensure package name equals 'aide-common' is installed
Existence Check: At Least One Exists
Item Check: All
Result: Fail
No matching system items were found.


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.2.1_Ensure_AIDE_is_installed"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.855-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>fail</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/9"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/14"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AU-2</xccdf:ident>
   <xccdf:complex-check operator="AND" negate="false">
      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                   negate="false"
                   multi-check="false">
         <xccdf:check-content-ref href="#OVAL-Results-1"
                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994962"/>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="definition"
                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994962">
               <div class="criteria">
                  <div class="criterion"
                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994962"
                       check="all"
                       check_existence="at_least_one_exists">
                     <table class="evidence-sep" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Criterion:</td>
                              <td>Ensure package name equals 'aide' is installed</td>
                           </tr>
                           <tr>
                              <td class="bold">Existence Check:</td>
                              <td>At Least One Exists</td>
                           </tr>
                           <tr>
                              <td class="bold">Item Check:</td>
                              <td>All</td>
                           </tr>
                           <tr>
                              <td class="bold">Result:</td>
                              <td class="fail">Fail</td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <tr>
                           <td>No matching system items were found.</td>
                        </tr>
                     </table>
                  </div>
               </div>
            </div>
         </evidence>
      </xccdf:check>
      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                   negate="false"
                   multi-check="false">
         <xccdf:check-content-ref href="#OVAL-Results-1"
                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994964"/>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="definition"
                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994964">
               <div class="criteria">
                  <div class="criterion"
                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994964"
                       check="all"
                       check_existence="at_least_one_exists">
                     <table class="evidence-sep" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Criterion:</td>
                              <td>Ensure package name equals 'aide-common' is installed</td>
                           </tr>
                           <tr>
                              <td class="bold">Existence Check:</td>
                              <td>At Least One Exists</td>
                           </tr>
                           <tr>
                              <td class="bold">Item Check:</td>
                              <td>All</td>
                           </tr>
                           <tr>
                              <td class="bold">Result:</td>
                              <td class="fail">Fail</td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <tr>
                           <td>No matching system items were found.</td>
                        </tr>
                     </table>
                  </div>
               </div>
            </div>
         </evidence>
      </xccdf:check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

  • URL: NIST SP 800-53 Rev. 5: AU-2

CIS Controls V7.0:

  • Control 14: Controlled Access Based on the Need to Know: -- More
    CIS Control Information
    Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
    Subcontrol: 14.9
    Label: Enforce Detail Logging for Access or Changes to Sensitive Data
    Description: Enforce detailed audit logging for access to sensitive data or changes to sensitive data (utilizing tools such as File Integrity Monitoring or Security Information and Event Monitoring).
  • >

CIS Critical Security Controls V8.0:

  • Control 3: Data Protection: -- More
    CIS Control Information
    Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
    Safeguard: 3.14
    Label: Log Sensitive Data Access
    Description: Log sensitive data access, including modification and disposal.
    Implementation Group: IG-3
    Security Function: Detect
  • >

Fail

1.2.2 Ensure filesystem integrity is regularly checked

Description:

Periodic checking of the filesystem integrity is needed to detect changes to the filesystem.

Periodic file checking allows the system administrator to determine on a regular basis if critical files have been changed in an unauthorized fashion.

If cron will be used to schedule and run aide check:

Run the following command:

# crontab -u root -e

Add the following line to the crontab:

0 5 * * * /usr/bin/aide.wrapper --config /etc/aide/aide.conf --check

OR If aidecheck.service and aidecheck.timer will be used to schedule and run aide check:

Create or edit the file /etc/systemd/system/aidecheck.service and add the following lines:

[Unit]

Description=Aide Check



[Service]

Type=simple

ExecStart=/usr/bin/aide.wrapper --config /etc/aide/aide.conf --check



[Install]

WantedBy=multi-user.target

Create or edit the file /etc/systemd/system/aidecheck.timer and add the following lines:

[Unit]

Description=Aide check every day at 5AM



[Timer]

OnCalendar=*-*-* 05:00:00

Unit=aidecheck.service



[Install]

WantedBy=multi-user.target

Run the following commands:

# chown root:root /etc/systemd/system/aidecheck.*

# chmod 0644 /etc/systemd/system/aidecheck.*



# systemctl daemon-reload



# systemctl enable aidecheck.service

# systemctl --now enable aidecheck.timer

Show Assessment Evidence
Complex Check
OR
Complex Check
OR
Complex Check
OR
Complex Check
OR
Complex Check
OR
Complex Check
OR
Complex Check
OR
Complex Check
OR
Criterion: Ensure at least one file(s) named ^.+$ in /var/spool/cron/ exists and matches pattern ^([-0-9*\/,A-Za-z]+\s+){5}([^#]+\s+)?\/usr\/bin\/aide\.wrapper\s--config\s+\/etc\/aide\/aide\.conf\s--check\b.*$
Existence Check: At Least One Exists
Item Check: All
Result: Fail
No matching system items were found.
Criterion: Ensure at least one file named /etc/crontab exists and matches pattern ^([-0-9*\/,A-Za-z]+\s+){5}([^#]+\s+)?\/usr\/bin\/aide\.wrapper\s--config\s+\/etc\/aide\/aide\.conf\s--check\b.*$
Existence Check: At Least One Exists
Item Check: All
Result: Fail
No matching system items were found.
Criterion: Ensure at least one file(s) named ^.+$ in /etc/cron.d exists and matches pattern ^([-0-9*\/,A-Za-z]+\s+){5}([^#]+\s+)?\/usr\/bin\/aide\.wrapper\s--config\s+\/etc\/aide\/aide\.conf\s--check\b.*$
Existence Check: At Least One Exists
Item Check: All
Result: Fail
No matching system items were found.
Criterion: Ensure at least one file(s) named ^.+$ in /etc/cron.hourly exists and matches pattern ^\s*([^#]+\s+)?\/usr\/bin\/aide\.wrapper\s--config\s+\/etc\/aide\/aide\.conf\s--check\b.*$
Existence Check: At Least One Exists
Item Check: All
Result: Fail
No matching system items were found.
Criterion: Ensure at least one file(s) named ^.+$ in /etc/cron.daily exists and matches pattern ^\s*([^#]+\s+)?\/usr\/bin\/aide\.wrapper\s--config\s+\/etc\/aide\/aide\.conf\s--check\b.*$
Existence Check: At Least One Exists
Item Check: All
Result: Fail
No matching system items were found.
Criterion: Ensure at least one file(s) named ^.+$ in /etc/cron.weekly exists and matches pattern ^\s*([^#]+\s+)?\/usr\/bin\/aide\.wrapper\s--config\s+\/etc\/aide\/aide\.conf\s--check\b.*$
Existence Check: At Least One Exists
Item Check: All
Result: Fail
No matching system items were found.
Criterion: Ensure at least one file(s) named ^.+$ in /etc/cron.monthly exists and matches pattern ^\s*([^#]+\s+)?\/usr\/bin\/aide\.wrapper\s--config\s+\/etc\/aide\/aide\.conf\s--check\b.*$
Existence Check: At Least One Exists
Item Check: All
Result: Fail
No matching system items were found.
Criterion: Ensure at least one file(s) named ^.+$ in /etc/cron.daily/ exists and matches pattern ^([^#\n\r]+\h+)?(\/usr\/s?bin\/|^\h*)aide(\.wrapper)?\h+(--check|([^#\n\r]+\h+)?\$AIDEARGS)\b
Existence Check: At Least One Exists
Item Check: All
Result: Fail
No matching system items were found.
Complex Check
AND
Complex Check
AND
Complex Check
AND
Criterion: Ensure systemd 'aidecheck.service' unit 'UnitFileState' property equals enabled
Existence Check: At Least One Exists
Item Check: All
Result: Fail
Systemdunitproperty Item
Name Type Status Value
Unit String Exists aidecheck.service
Property String Exists UnitFileState
Value String Exists No Value
Criterion: Ensure systemd 'aidecheck.timer' unit 'UnitFileState' property equals enabled
Existence Check: At Least One Exists
Item Check: All
Result: Fail
Systemdunitproperty Item
Name Type Status Value
Unit String Exists aidecheck.timer
Property String Exists UnitFileState
Value String Exists No Value
Criterion: Ensure systemd 'aidecheck.timer' unit 'Unit' property equals 'aidecheck.service'
Existence Check: At Least One Exists
Item Check: All
Result: Fail
Systemdunitproperty Item
Name Type Status Value
Unit String Exists aidecheck.timer
Property String Exists Unit
Value String Exists No Value
Criterion: Ensure at least one file(s) named aidecheck.service in /etc/systemd/system/ exists and matches pattern ^\s*ExecStart=([^#]+\s+)?\/usr\/bin\/aide\.wrapper\s--config\s\/etc\/aide\/aide\.conf\s--check\b.*$
Existence Check: At Least One Exists
Item Check: All
Result: Fail
No matching system items were found.


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.2.2_Ensure_filesystem_integrity_is_regularly_checked"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.856-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>fail</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/9"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/8/subcontrol/5"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">https://github.com/konstruktoid/hardening/blob/master/config/aidecheck.service</xccdf:ident>
   <xccdf:ident system="URL">https://github.com/konstruktoid/hardening/blob/master/config/aidecheck.timer</xccdf:ident>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AU-2</xccdf:ident>
   <xccdf:complex-check operator="OR" negate="false">
      <xccdf:complex-check operator="OR" negate="false">
         <xccdf:complex-check operator="OR" negate="false">
            <xccdf:complex-check operator="OR" negate="false">
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="OR" negate="false">
                     <xccdf:complex-check operator="OR" negate="false">
                        <xccdf:complex-check operator="OR" negate="false">
                           <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                        negate="false"
                                        multi-check="false">
                              <xccdf:check-content-ref href="#OVAL-Results-1"
                                                       name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994966"/>
                              <evidence xmlns="http://cisecurity.org/evidence">
                                 <div class="definition"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994966">
                                    <div class="criteria">
                                       <div class="criterion"
                                            id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994966"
                                            check="all"
                                            check_existence="at_least_one_exists">
                                          <table class="evidence-sep" width="100%">
                                             <tbody class="tbe">
                                                <tr>
                                                   <td class="bold">Criterion:</td>
                                                   <td>Ensure at least one file(s) named ^.+$ in /var/spool/cron/ exists and matches pattern ^([-0-9*\/,A-Za-z]+\s+){5}([^#]+\s+)?\/usr\/bin\/aide\.wrapper\s--config\s+\/etc\/aide\/aide\.conf\s--check\b.*$</td>
                                                </tr>
                                                <tr>
                                                   <td class="bold">Existence Check:</td>
                                                   <td>At Least One Exists</td>
                                                </tr>
                                                <tr>
                                                   <td class="bold">Item Check:</td>
                                                   <td>All</td>
                                                </tr>
                                                <tr>
                                                   <td class="bold">Result:</td>
                                                   <td class="fail">Fail</td>
                                                </tr>
                                             </tbody>
                                          </table>
                                          <table class="evidence" width="100%">
                                             <tr>
                                                <td>No matching system items were found.</td>
                                             </tr>
                                          </table>
                                       </div>
                                    </div>
                                 </div>
                              </evidence>
                           </xccdf:check>
                           <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                        negate="false"
                                        multi-check="false">
                              <xccdf:check-content-ref href="#OVAL-Results-1"
                                                       name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994970"/>
                              <evidence xmlns="http://cisecurity.org/evidence">
                                 <div class="definition"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994970">
                                    <div class="criteria">
                                       <div class="criterion"
                                            id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994970"
                                            check="all"
                                            check_existence="at_least_one_exists">
                                          <table class="evidence-sep" width="100%">
                                             <tbody class="tbe">
                                                <tr>
                                                   <td class="bold">Criterion:</td>
                                                   <td>Ensure at least one file named /etc/crontab exists and matches pattern ^([-0-9*\/,A-Za-z]+\s+){5}([^#]+\s+)?\/usr\/bin\/aide\.wrapper\s--config\s+\/etc\/aide\/aide\.conf\s--check\b.*$</td>
                                                </tr>
                                                <tr>
                                                   <td class="bold">Existence Check:</td>
                                                   <td>At Least One Exists</td>
                                                </tr>
                                                <tr>
                                                   <td class="bold">Item Check:</td>
                                                   <td>All</td>
                                                </tr>
                                                <tr>
                                                   <td class="bold">Result:</td>
                                                   <td class="fail">Fail</td>
                                                </tr>
                                             </tbody>
                                          </table>
                                          <table class="evidence" width="100%">
                                             <tr>
                                                <td>No matching system items were found.</td>
                                             </tr>
                                          </table>
                                       </div>
                                    </div>
                                 </div>
                              </evidence>
                           </xccdf:check>
                        </xccdf:complex-check>
                        <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-content-ref href="#OVAL-Results-1"
                                                    name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994973"/>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="definition"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994973">
                                 <div class="criteria">
                                    <div class="criterion"
                                         id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994973"
                                         check="all"
                                         check_existence="at_least_one_exists">
                                       <table class="evidence-sep" width="100%">
                                          <tbody class="tbe">
                                             <tr>
                                                <td class="bold">Criterion:</td>
                                                <td>Ensure at least one file(s) named ^.+$ in /etc/cron.d exists and matches pattern ^([-0-9*\/,A-Za-z]+\s+){5}([^#]+\s+)?\/usr\/bin\/aide\.wrapper\s--config\s+\/etc\/aide\/aide\.conf\s--check\b.*$</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Existence Check:</td>
                                                <td>At Least One Exists</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Item Check:</td>
                                                <td>All</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Result:</td>
                                                <td class="fail">Fail</td>
                                             </tr>
                                          </tbody>
                                       </table>
                                       <table class="evidence" width="100%">
                                          <tr>
                                             <td>No matching system items were found.</td>
                                          </tr>
                                       </table>
                                    </div>
                                 </div>
                              </div>
                           </evidence>
                        </xccdf:check>
                     </xccdf:complex-check>
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994975"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994975">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994975"
                                      check="all"
                                      check_existence="at_least_one_exists">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure at least one file(s) named ^.+$ in /etc/cron.hourly exists and matches pattern ^\s*([^#]+\s+)?\/usr\/bin\/aide\.wrapper\s--config\s+\/etc\/aide\/aide\.conf\s--check\b.*$</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>At Least One Exists</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="fail">Fail</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994978"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994978">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994978"
                                   check="all"
                                   check_existence="at_least_one_exists">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure at least one file(s) named ^.+$ in /etc/cron.daily exists and matches pattern ^\s*([^#]+\s+)?\/usr\/bin\/aide\.wrapper\s--config\s+\/etc\/aide\/aide\.conf\s--check\b.*$</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>At Least One Exists</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
               <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                            negate="false"
                            multi-check="false">
                  <xccdf:check-content-ref href="#OVAL-Results-1"
                                           name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994981"/>
                  <evidence xmlns="http://cisecurity.org/evidence">
                     <div class="definition"
                          id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994981">
                        <div class="criteria">
                           <div class="criterion"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994981"
                                check="all"
                                check_existence="at_least_one_exists">
                              <table class="evidence-sep" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Criterion:</td>
                                       <td>Ensure at least one file(s) named ^.+$ in /etc/cron.weekly exists and matches pattern ^\s*([^#]+\s+)?\/usr\/bin\/aide\.wrapper\s--config\s+\/etc\/aide\/aide\.conf\s--check\b.*$</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Existence Check:</td>
                                       <td>At Least One Exists</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Item Check:</td>
                                       <td>All</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Result:</td>
                                       <td class="fail">Fail</td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tr>
                                    <td>No matching system items were found.</td>
                                 </tr>
                              </table>
                           </div>
                        </div>
                     </div>
                  </evidence>
               </xccdf:check>
            </xccdf:complex-check>
            <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                         negate="false"
                         multi-check="false">
               <xccdf:check-content-ref href="#OVAL-Results-1"
                                        name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994984"/>
               <evidence xmlns="http://cisecurity.org/evidence">
                  <div class="definition"
                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994984">
                     <div class="criteria">
                        <div class="criterion"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994984"
                             check="all"
                             check_existence="at_least_one_exists">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Criterion:</td>
                                    <td>Ensure at least one file(s) named ^.+$ in /etc/cron.monthly exists and matches pattern ^\s*([^#]+\s+)?\/usr\/bin\/aide\.wrapper\s--config\s+\/etc\/aide\/aide\.conf\s--check\b.*$</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Existence Check:</td>
                                    <td>At Least One Exists</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Item Check:</td>
                                    <td>All</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tr>
                                 <td>No matching system items were found.</td>
                              </tr>
                           </table>
                        </div>
                     </div>
                  </div>
               </evidence>
            </xccdf:check>
         </xccdf:complex-check>
         <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                      negate="false"
                      multi-check="false">
            <xccdf:check-content-ref href="#OVAL-Results-1"
                                     name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995001"/>
            <evidence xmlns="http://cisecurity.org/evidence">
               <div class="definition"
                    id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995001">
                  <div class="criteria">
                     <div class="criterion"
                          id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995001"
                          check="all"
                          check_existence="at_least_one_exists">
                        <table class="evidence-sep" width="100%">
                           <tbody class="tbe">
                              <tr>
                                 <td class="bold">Criterion:</td>
                                 <td>Ensure at least one file(s) named ^.+$ in /etc/cron.daily/ exists and matches pattern ^([^#\n\r]+\h+)?(\/usr\/s?bin\/|^\h*)aide(\.wrapper)?\h+(--check|([^#\n\r]+\h+)?\$AIDEARGS)\b</td>
                              </tr>
                              <tr>
                                 <td class="bold">Existence Check:</td>
                                 <td>At Least One Exists</td>
                              </tr>
                              <tr>
                                 <td class="bold">Item Check:</td>
                                 <td>All</td>
                              </tr>
                              <tr>
                                 <td class="bold">Result:</td>
                                 <td class="fail">Fail</td>
                              </tr>
                           </tbody>
                        </table>
                        <table class="evidence" width="100%">
                           <tr>
                              <td>No matching system items were found.</td>
                           </tr>
                        </table>
                     </div>
                  </div>
               </div>
            </evidence>
         </xccdf:check>
      </xccdf:complex-check>
      <xccdf:complex-check operator="AND" negate="false">
         <xccdf:complex-check operator="AND" negate="false">
            <xccdf:complex-check operator="AND" negate="false">
               <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                            negate="false"
                            multi-check="false">
                  <xccdf:check-export export-name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3994987"
                                      value-id="xccdf_org.cisecurity.benchmarks_value_3994987_var"/>
                  <xccdf:check-content-ref href="#OVAL-Results-1"
                                           name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994987"/>
                  <evidence xmlns="http://cisecurity.org/evidence">
                     <div class="definition"
                          id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994987">
                        <div class="criteria">
                           <div class="criterion"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994987"
                                check="all"
                                check_existence="at_least_one_exists">
                              <table class="evidence-sep" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Criterion:</td>
                                       <td>Ensure systemd 'aidecheck.service' unit 'UnitFileState' property equals enabled</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Existence Check:</td>
                                       <td>At Least One Exists</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Item Check:</td>
                                       <td>All</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Result:</td>
                                       <td class="fail">Fail</td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <caption>Systemdunitproperty Item</caption>
                                 <thead>
                                    <tr>
                                       <th scope="col">Name</th>
                                       <th scope="col">Type</th>
                                       <th scope="col">Status</th>
                                       <th scope="col">Value</th>
                                    </tr>
                                 </thead>
                                 <tbody class="tbe">
                                    <tr>
                                       <td>Unit</td>
                                       <td>String</td>
                                       <td>Exists</td>
                                       <td>aidecheck.service</td>
                                    </tr>
                                    <tr>
                                       <td>Property</td>
                                       <td>String</td>
                                       <td>Exists</td>
                                       <td>UnitFileState</td>
                                    </tr>
                                    <tr class="evaluated">
                                       <td>Value</td>
                                       <td>String</td>
                                       <td>Exists</td>
                                       <td>No Value</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </div>
                     </div>
                  </evidence>
               </xccdf:check>
               <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                            negate="false"
                            multi-check="false">
                  <xccdf:check-export export-name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3994991"
                                      value-id="xccdf_org.cisecurity.benchmarks_value_3994991_var"/>
                  <xccdf:check-content-ref href="#OVAL-Results-1"
                                           name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994991"/>
                  <evidence xmlns="http://cisecurity.org/evidence">
                     <div class="definition"
                          id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994991">
                        <div class="criteria">
                           <div class="criterion"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994991"
                                check="all"
                                check_existence="at_least_one_exists">
                              <table class="evidence-sep" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Criterion:</td>
                                       <td>Ensure systemd 'aidecheck.timer' unit 'UnitFileState' property equals enabled</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Existence Check:</td>
                                       <td>At Least One Exists</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Item Check:</td>
                                       <td>All</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Result:</td>
                                       <td class="fail">Fail</td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <caption>Systemdunitproperty Item</caption>
                                 <thead>
                                    <tr>
                                       <th scope="col">Name</th>
                                       <th scope="col">Type</th>
                                       <th scope="col">Status</th>
                                       <th scope="col">Value</th>
                                    </tr>
                                 </thead>
                                 <tbody class="tbe">
                                    <tr>
                                       <td>Unit</td>
                                       <td>String</td>
                                       <td>Exists</td>
                                       <td>aidecheck.timer</td>
                                    </tr>
                                    <tr>
                                       <td>Property</td>
                                       <td>String</td>
                                       <td>Exists</td>
                                       <td>UnitFileState</td>
                                    </tr>
                                    <tr class="evaluated">
                                       <td>Value</td>
                                       <td>String</td>
                                       <td>Exists</td>
                                       <td>No Value</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </div>
                     </div>
                  </evidence>
               </xccdf:check>
            </xccdf:complex-check>
            <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                         negate="false"
                         multi-check="false">
               <xccdf:check-export export-name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3994994"
                                   value-id="xccdf_org.cisecurity.benchmarks_value_3994994_var"/>
               <xccdf:check-content-ref href="#OVAL-Results-1"
                                        name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994994"/>
               <evidence xmlns="http://cisecurity.org/evidence">
                  <div class="definition"
                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994994">
                     <div class="criteria">
                        <div class="criterion"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994994"
                             check="all"
                             check_existence="at_least_one_exists">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Criterion:</td>
                                    <td>Ensure systemd 'aidecheck.timer' unit 'Unit' property equals 'aidecheck.service'</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Existence Check:</td>
                                    <td>At Least One Exists</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Item Check:</td>
                                    <td>All</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <caption>Systemdunitproperty Item</caption>
                              <thead>
                                 <tr>
                                    <th scope="col">Name</th>
                                    <th scope="col">Type</th>
                                    <th scope="col">Status</th>
                                    <th scope="col">Value</th>
                                 </tr>
                              </thead>
                              <tbody class="tbe">
                                 <tr>
                                    <td>Unit</td>
                                    <td>String</td>
                                    <td>Exists</td>
                                    <td>aidecheck.timer</td>
                                 </tr>
                                 <tr>
                                    <td>Property</td>
                                    <td>String</td>
                                    <td>Exists</td>
                                    <td>Unit</td>
                                 </tr>
                                 <tr class="evaluated">
                                    <td>Value</td>
                                    <td>String</td>
                                    <td>Exists</td>
                                    <td>No Value</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </div>
                  </div>
               </evidence>
            </xccdf:check>
         </xccdf:complex-check>
         <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                      negate="false"
                      multi-check="false">
            <xccdf:check-content-ref href="#OVAL-Results-1"
                                     name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994997"/>
            <evidence xmlns="http://cisecurity.org/evidence">
               <div class="definition"
                    id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994997">
                  <div class="criteria">
                     <div class="criterion"
                          id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994997"
                          check="all"
                          check_existence="at_least_one_exists">
                        <table class="evidence-sep" width="100%">
                           <tbody class="tbe">
                              <tr>
                                 <td class="bold">Criterion:</td>
                                 <td>Ensure at least one file(s) named aidecheck.service in /etc/systemd/system/ exists and matches pattern ^\s*ExecStart=([^#]+\s+)?\/usr\/bin\/aide\.wrapper\s--config\s\/etc\/aide\/aide\.conf\s--check\b.*$</td>
                              </tr>
                              <tr>
                                 <td class="bold">Existence Check:</td>
                                 <td>At Least One Exists</td>
                              </tr>
                              <tr>
                                 <td class="bold">Item Check:</td>
                                 <td>All</td>
                              </tr>
                              <tr>
                                 <td class="bold">Result:</td>
                                 <td class="fail">Fail</td>
                              </tr>
                           </tbody>
                        </table>
                        <table class="evidence" width="100%">
                           <tr>
                              <td>No matching system items were found.</td>
                           </tr>
                        </table>
                     </div>
                  </div>
               </div>
            </evidence>
         </xccdf:check>
      </xccdf:complex-check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

  • URL: https://github.com/konstruktoid/hardening/blob/master/config/aidecheck.service
  • URL: https://github.com/konstruktoid/hardening/blob/master/config/aidecheck.timer
  • URL: NIST SP 800-53 Rev. 5: AU-2

CIS Controls V7.0:

  • Control 14: Controlled Access Based on the Need to Know: -- More
    CIS Control Information
    Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
    Subcontrol: 14.9
    Label: Enforce Detail Logging for Access or Changes to Sensitive Data
    Description: Enforce detailed audit logging for access to sensitive data or changes to sensitive data (utilizing tools such as File Integrity Monitoring or Security Information and Event Monitoring).
  • >

CIS Critical Security Controls V8.0:

  • Control 8: Audit Log Management: -- More
    CIS Control Information
    Control: Collect, alert, review, and retain audit logs of events that could help detect, understand, or recover from an attack.
    Safeguard: 8.5
    Label: Collect Detailed Audit Logs
    Description: Configure detailed audit logging for enterprise assets containing sensitive data. Include event source, date, username, timestamp, source addresses, destination addresses, and other useful elements that could assist in a forensic investigation.
    Implementation Group: IG-2
    Security Function: Detect
  • >

1.3 Configure Software and Patch Management

Outdated software is vulnerable to cyber criminals and hackers. Software updates help reduce the risk to your organization. The release of software update notes often reveal the patched exploitable entry points to the public. Public knowledge of these exploits cans your organization more vulnerable to malicious actors attempting to gain entry to your system's data.

Software updates often offer new and improved features and speed enhancements

Manual

1.3.1 Ensure updates, patches, and additional security software are installed

Description:

Periodically patches are released for included software either due to security flaws or to include additional functionality.

Newer patches may contain security enhancements that would not be available through the latest full update. As a result, it is recommended that the latest software patches be used to take advantage of the latest functionality. As with any software installation, organizations need to determine if a given update meets their requirements and verify the compatibility and supportability of any additional software against the update revision that is selected.

Run the following command to update all packages following local site policy guidance on applying updates and patches:

# apt upgrade

OR

# apt dist-upgrade



Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.3.1_Ensure_updates_patches_and_additional_security_software_are_installed"
                   role="unscored"
                   severity="unknown"
                   time="2024-04-14T23:46:23.856-04:00"
                   version="1"
                   weight="0.0">
   <xccdf:result>notchecked</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/3/subcontrol/4"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/3/subcontrol/5"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/7/subcontrol/3"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: SI-2</xccdf:ident>
</xccdf:rule-result>

References:

  • URL: NIST SP 800-53 Rev. 5: SI-2

CIS Controls V7.0:

  • Control 3: Continuous Vulnerability Management: -- More
    CIS Control Information
    Control: Continuously acquire, assess, and take action on new information in order to identify vulnerabilities, remediate, and minimize the window of opportunity for attackers.
    Subcontrol: 3.4
    Label: Deploy Automated Operating System Patch Management Tools
    Description: Deploy automated software update tools in order to ensure that the operating systems are running the most recent security updates provided by the software vendor.
  • Control 3: Continuous Vulnerability Management: -- More
    CIS Control Information
    Control: Continuously acquire, assess, and take action on new information in order to identify vulnerabilities, remediate, and minimize the window of opportunity for attackers.
    Subcontrol: 3.5
    Label: Deploy Automated Software Patch Management Tools
    Description: Deploy automated software update tools in order to ensure that third-party software on all systems is running the most recent security updates provided by the software vendor.
  • >

CIS Critical Security Controls V8.0:

  • Control 7: Continuous Vulnerability Management: -- More
    CIS Control Information
    Control: Develop a plan to continuously assess and track vulnerabilities on all enterprise assets within the enterprise's infrastructure, in order to remediate, and minimize, the window of opportunity for attackers. Monitor public and private industry sources for new threat and vulnerability information.
    Safeguard: 7.3
    Label: Perform Automated Operating System Patch Management
    Description: Perform operating system updates on enterprise assets through automated patch management on a monthly, or more frequent, basis.
    Implementation Group: IG-1
    Security Function: Protect
  • >

Manual

1.3.2 Ensure package manager repositories are configured

Description:

Systems need to have package manager repositories configured to ensure they receive the latest patches and updates.

If a system's package repositories are misconfigured important patches may not be identified or a rogue repository could introduce compromised software.

Configure your package manager repositories according to site policy.



Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.3.2_Ensure_package_manager_repositories_are_configured"
                   role="unscored"
                   severity="unknown"
                   time="2024-04-14T23:46:23.856-04:00"
                   version="1"
                   weight="0.0">
   <xccdf:result>notchecked</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/3/subcontrol/4"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/3/subcontrol/5"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/7/subcontrol/3"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: SI-2</xccdf:ident>
</xccdf:rule-result>

References:

  • URL: NIST SP 800-53 Rev. 5: SI-2

CIS Controls V7.0:

  • Control 3: Continuous Vulnerability Management: -- More
    CIS Control Information
    Control: Continuously acquire, assess, and take action on new information in order to identify vulnerabilities, remediate, and minimize the window of opportunity for attackers.
    Subcontrol: 3.4
    Label: Deploy Automated Operating System Patch Management Tools
    Description: Deploy automated software update tools in order to ensure that the operating systems are running the most recent security updates provided by the software vendor.
  • Control 3: Continuous Vulnerability Management: -- More
    CIS Control Information
    Control: Continuously acquire, assess, and take action on new information in order to identify vulnerabilities, remediate, and minimize the window of opportunity for attackers.
    Subcontrol: 3.5
    Label: Deploy Automated Software Patch Management Tools
    Description: Deploy automated software update tools in order to ensure that third-party software on all systems is running the most recent security updates provided by the software vendor.
  • >

CIS Critical Security Controls V8.0:

  • Control 7: Continuous Vulnerability Management: -- More
    CIS Control Information
    Control: Develop a plan to continuously assess and track vulnerabilities on all enterprise assets within the enterprise's infrastructure, in order to remediate, and minimize, the window of opportunity for attackers. Monitor public and private industry sources for new threat and vulnerability information.
    Safeguard: 7.3
    Label: Perform Automated Operating System Patch Management
    Description: Perform operating system updates on enterprise assets through automated patch management on a monthly, or more frequent, basis.
    Implementation Group: IG-1
    Security Function: Protect
  • >

Manual

1.3.3 Ensure GPG keys are configured

Description:

Most packages managers implement GPG key signing to verify package integrity during installation.

It is important to ensure that updates are obtained from a valid source to protect against spoofing that could lead to the inadvertent installation of malware on the system.

Update your package manager GPG keys in accordance with site policy.



Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.3.3_Ensure_GPG_keys_are_configured"
                   role="unscored"
                   severity="unknown"
                   time="2024-04-14T23:46:23.856-04:00"
                   version="1"
                   weight="0.0">
   <xccdf:result>notchecked</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/3/subcontrol/4"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/3/subcontrol/5"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/7/subcontrol/3"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: SI-2</xccdf:ident>
</xccdf:rule-result>

References:

  • URL: NIST SP 800-53 Rev. 5: SI-2

CIS Controls V7.0:

  • Control 3: Continuous Vulnerability Management: -- More
    CIS Control Information
    Control: Continuously acquire, assess, and take action on new information in order to identify vulnerabilities, remediate, and minimize the window of opportunity for attackers.
    Subcontrol: 3.4
    Label: Deploy Automated Operating System Patch Management Tools
    Description: Deploy automated software update tools in order to ensure that the operating systems are running the most recent security updates provided by the software vendor.
  • Control 3: Continuous Vulnerability Management: -- More
    CIS Control Information
    Control: Continuously acquire, assess, and take action on new information in order to identify vulnerabilities, remediate, and minimize the window of opportunity for attackers.
    Subcontrol: 3.5
    Label: Deploy Automated Software Patch Management Tools
    Description: Deploy automated software update tools in order to ensure that third-party software on all systems is running the most recent security updates provided by the software vendor.
  • >

CIS Critical Security Controls V8.0:

  • Control 7: Continuous Vulnerability Management: -- More
    CIS Control Information
    Control: Develop a plan to continuously assess and track vulnerabilities on all enterprise assets within the enterprise's infrastructure, in order to remediate, and minimize, the window of opportunity for attackers. Monitor public and private industry sources for new threat and vulnerability information.
    Safeguard: 7.3
    Label: Perform Automated Operating System Patch Management
    Description: Perform operating system updates on enterprise assets through automated patch management on a monthly, or more frequent, basis.
    Implementation Group: IG-1
    Security Function: Protect
  • >

1.4 Secure Boot Settings

The recommendations in this section focus on securing the bootloader and settings involved in the boot process directly.

Fail

1.4.1 Ensure bootloader password is set

Description:

Setting the boot loader password will require that anyone rebooting the system must enter a password before being able to set command line boot parameters

Requiring a boot password upon execution of the boot loader will prevent an unauthorized user from entering boot parameters or changing the boot partition. This prevents users from weakening security (e.g. turning off AppArmor at boot time).

Create an encrypted password with grub-mkpasswd-pbkdf2 :

# grub-mkpasswd-pbkdf2



Enter password: <password>

Reenter password: <password>

PBKDF2 hash of your password is <encrypted-password>

Add the following into a custom /etc/grub.d configuration file:

cat <<EOF

set superusers="<username>"

password_pbkdf2 <username> <encrypted-password>

EOF

The superuser/user information and password should not be contained in the /etc/grub.d/00_header file as this file could be overwritten in a package update.

If there is a requirement to be able to boot/reboot without entering the password, edit /etc/grub.d/10_linux and add --unrestricted to the line CLASS=

Example:

CLASS="--class gnu-linux --class gnu --class os --unrestricted"

Run the following command to update the grub2 configuration:

# update-grub

Impact:

If password protection is enabled, only the designated superuser can edit a GRUB 2 menu item by pressing "e" or access the GRUB 2 command line by pressing "c"

If GRUB 2 is set up to boot automatically to a password-protected menu entry the user has no option to back out of the password prompt to select another menu entry. Holding the SHIFT key will not display the menu in this case. The user must enter the correct username and password. If unable to do so, the configuration files will have to be edited via a LiveCD or other means to fix the problem

You can add --unrestricted to the menu entries to allow the system to boot without entering a password. A password will still be required to edit menu items.

More Information: https://help.ubuntu.com/community/Grub2/Passwords

Show Assessment Evidence
Complex Check
AND
Criterion: Ensure at least one file named /boot/grub/grub.cfg exists and matches pattern ^\s*set\s+superusers\s*=\s*"[^"]*"\s*(\s+#.*)?$
Existence Check: At Least One Exists
Item Check: All
Result: Fail
No matching system items were found.
Criterion: Ensure at least one file named /boot/grub/grub.cfg exists and matches pattern ^\s*password_pbkdf2\s+\S+\s+\S+\s*(\s+#.*)?$
Existence Check: At Least One Exists
Item Check: All
Result: Fail
No matching system items were found.


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.4.1_Ensure_bootloader_password_is_set"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.856-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>fail</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/4/subcontrol/4"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/5/subcontrol/2"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-6</xccdf:ident>
   <xccdf:complex-check operator="AND" negate="false">
      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                   negate="false"
                   multi-check="false">
         <xccdf:check-content-ref href="#OVAL-Results-1"
                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995006"/>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="definition"
                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995006">
               <div class="criteria">
                  <div class="criterion"
                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995006"
                       check="all"
                       check_existence="at_least_one_exists">
                     <table class="evidence-sep" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Criterion:</td>
                              <td>Ensure at least one file named /boot/grub/grub.cfg exists and matches pattern ^\s*set\s+superusers\s*=\s*"[^"]*"\s*(\s+#.*)?$</td>
                           </tr>
                           <tr>
                              <td class="bold">Existence Check:</td>
                              <td>At Least One Exists</td>
                           </tr>
                           <tr>
                              <td class="bold">Item Check:</td>
                              <td>All</td>
                           </tr>
                           <tr>
                              <td class="bold">Result:</td>
                              <td class="fail">Fail</td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <tr>
                           <td>No matching system items were found.</td>
                        </tr>
                     </table>
                  </div>
               </div>
            </div>
         </evidence>
      </xccdf:check>
      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                   negate="false"
                   multi-check="false">
         <xccdf:check-content-ref href="#OVAL-Results-1"
                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995010"/>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="definition"
                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995010">
               <div class="criteria">
                  <div class="criterion"
                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995010"
                       check="all"
                       check_existence="at_least_one_exists">
                     <table class="evidence-sep" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Criterion:</td>
                              <td>Ensure at least one file named /boot/grub/grub.cfg exists and matches pattern ^\s*password_pbkdf2\s+\S+\s+\S+\s*(\s+#.*)?$</td>
                           </tr>
                           <tr>
                              <td class="bold">Existence Check:</td>
                              <td>At Least One Exists</td>
                           </tr>
                           <tr>
                              <td class="bold">Item Check:</td>
                              <td>All</td>
                           </tr>
                           <tr>
                              <td class="bold">Result:</td>
                              <td class="fail">Fail</td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <tr>
                           <td>No matching system items were found.</td>
                        </tr>
                     </table>
                  </div>
               </div>
            </div>
         </evidence>
      </xccdf:check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

  • URL: NIST SP 800-53 Rev. 5: CM-6

CIS Controls V7.0:

  • Control 4: Controlled Use of Administrative Privileges: -- More
    CIS Control Information
    Control: The processes and tools used to track/control/prevent/correct the use, assignment, and configuration of administrative privileges on computers, networks, and applications.
    Subcontrol: 4.4
    Label: Use Unique Passwords
    Description: Where multi-factor authentication is not supported (such as local administrator, root, or service accounts), accounts will use passwords that are unique to that system.
  • >

CIS Critical Security Controls V8.0:

  • Control 5: Account Management: -- More
    CIS Control Information
    Control: Use processes and tools to assign and manage authorization to credentials for user accounts, including administrator accounts, as well as service accounts, to enterprise assets and software.
    Safeguard: 5.2
    Label: Use Unique Passwords
    Description: Use unique passwords for all enterprise assets. Best practice implementation includes, at a minimum, an 8-character password for accounts using MFA and a 14-character password for accounts not using MFA.
    Implementation Group: IG-1
    Security Function: Protect
  • >

Fail

1.4.2 Ensure permissions on bootloader config are configured

Description:

The grub configuration file contains information on boot settings and passwords for unlocking boot options.

Setting the permissions to read and write for root only prevents non-root users from seeing the boot parameters or changing them. Non-root users who read the boot parameters may be able to identify weaknesses in security upon boot and be able to exploit them.

Run the following commands to set permissions on your grub configuration:

# chown root:root /boot/grub/grub.cfg

# chmod u-x,go-rwx /boot/grub/grub.cfg

Show Assessment Evidence
Complex Check
AND
Criterion: Ensure at least one file named /boot/grub/grub.cfg exists and is owned by 0:0 and does not have permissions --xrwxrwx
Existence Check: At Least One Exists
Item Check: All
Result: Fail
No matching system items were found.


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.4.2_Ensure_permissions_on_bootloader_config_are_configured"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.857-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>fail</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-6</xccdf:ident>
   <xccdf:complex-check operator="AND" negate="false">
      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                   negate="false"
                   multi-check="false">
         <xccdf:check-content-ref href="#OVAL-Results-1"
                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:4080492"/>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="definition"
                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:4080492">
               <div class="criteria">
                  <div class="criterion"
                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:4080492"
                       check="all"
                       check_existence="at_least_one_exists">
                     <table class="evidence-sep" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Criterion:</td>
                              <td>Ensure at least one file named /boot/grub/grub.cfg exists and is owned by 0:0 and does not have permissions --xrwxrwx</td>
                           </tr>
                           <tr>
                              <td class="bold">Existence Check:</td>
                              <td>At Least One Exists</td>
                           </tr>
                           <tr>
                              <td class="bold">Item Check:</td>
                              <td>All</td>
                           </tr>
                           <tr>
                              <td class="bold">Result:</td>
                              <td class="fail">Fail</td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <tr>
                           <td>No matching system items were found.</td>
                        </tr>
                     </table>
                  </div>
               </div>
            </div>
         </evidence>
      </xccdf:check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

  • URL: NIST SP 800-53 Rev. 5: CM-6

CIS Controls V7.0:

  • Control 14: Controlled Access Based on the Need to Know: -- More
    CIS Control Information
    Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
    Subcontrol: 14.6
    Label: Protect Information through Access Control Lists
    Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
  • >

CIS Critical Security Controls V8.0:

  • Control 3: Data Protection: -- More
    CIS Control Information
    Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
    Safeguard: 3.3
    Label: Configure Data Access Control Lists
    Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
    Implementation Group: IG-1
    Security Function: Protect
  • >

Pass

1.4.3 Ensure authentication required for single user mode

Description:

Single user mode is used for recovery when the system detects an issue during boot or by manual selection from the bootloader.

Requiring authentication in single user mode prevents an unauthorized user from rebooting the system into single user to gain root privileges without credentials.

Run the following command and follow the prompts to set a password for the root user:

# passwd root

Show Assessment Evidence
Complex Check
AND
Criterion: Ensure usernames equals root have shadow parameter password Pattern Match ^\$(y|[56]|g) (string)
Existence Check: At Least One Exists
Item Check: All
Result: Pass
Shadow Item
Name Type Status Value
Username String Exists root
Password String Exists $6$[OBFUSCATED HASHED PWD]
Chg Lst Int Exists 19753
Chg Allow Int Exists 0
Chg Req Int Exists 99999
Exp Warn Int Exists 7
Exp Inact Int Does not exist No Value
Exp Date Int Does not exist No Value
Flag String Exists No Value
Encrypt Method String Exists SHA-512


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.4.3_Ensure_authentication_required_for_single_user_mode"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.857-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>pass</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/4/subcontrol/4"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/5/subcontrol/2"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: IA-5</xccdf:ident>
   <xccdf:complex-check operator="AND" negate="false">
      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                   negate="false"
                   multi-check="false">
         <xccdf:check-export export-name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3995019"
                             value-id="xccdf_org.cisecurity.benchmarks_value_3995019_var"/>
         <xccdf:check-content-ref href="#OVAL-Results-1"
                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995019"/>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="definition"
                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995019">
               <div class="criteria">
                  <div class="criterion"
                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995019"
                       check="all"
                       check_existence="at_least_one_exists">
                     <table class="evidence-sep" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Criterion:</td>
                              <td>Ensure usernames equals root have shadow parameter password Pattern Match ^\$(y|[56]|g) (string)</td>
                           </tr>
                           <tr>
                              <td class="bold">Existence Check:</td>
                              <td>At Least One Exists</td>
                           </tr>
                           <tr>
                              <td class="bold">Item Check:</td>
                              <td>All</td>
                           </tr>
                           <tr>
                              <td class="bold">Result:</td>
                              <td class="pass">Pass</td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <caption>Shadow Item</caption>
                        <thead>
                           <tr>
                              <th scope="col">Name</th>
                              <th scope="col">Type</th>
                              <th scope="col">Status</th>
                              <th scope="col">Value</th>
                           </tr>
                        </thead>
                        <tbody class="tbe">
                           <tr>
                              <td>Username</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>root</td>
                           </tr>
                           <tr class="evaluated">
                              <td>Password</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>$6$[OBFUSCATED HASHED PWD]</td>
                           </tr>
                           <tr>
                              <td>Chg Lst</td>
                              <td>Int</td>
                              <td>Exists</td>
                              <td>19753</td>
                           </tr>
                           <tr>
                              <td>Chg Allow</td>
                              <td>Int</td>
                              <td>Exists</td>
                              <td>0</td>
                           </tr>
                           <tr>
                              <td>Chg Req</td>
                              <td>Int</td>
                              <td>Exists</td>
                              <td>99999</td>
                           </tr>
                           <tr>
                              <td>Exp Warn</td>
                              <td>Int</td>
                              <td>Exists</td>
                              <td>7</td>
                           </tr>
                           <tr>
                              <td>Exp Inact</td>
                              <td>Int</td>
                              <td>Does not exist</td>
                              <td>No Value</td>
                           </tr>
                           <tr>
                              <td>Exp Date</td>
                              <td>Int</td>
                              <td>Does not exist</td>
                              <td>No Value</td>
                           </tr>
                           <tr>
                              <td>Flag</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>No Value</td>
                           </tr>
                           <tr>
                              <td>Encrypt Method</td>
                              <td>String</td>
                              <td>Exists</td>
                              <td>SHA-512</td>
                           </tr>
                        </tbody>
                     </table>
                  </div>
               </div>
            </div>
         </evidence>
      </xccdf:check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

  • URL: NIST SP 800-53 Rev. 5: IA-5

CIS Controls V7.0:

  • Control 4: Controlled Use of Administrative Privileges: -- More
    CIS Control Information
    Control: The processes and tools used to track/control/prevent/correct the use, assignment, and configuration of administrative privileges on computers, networks, and applications.
    Subcontrol: 4.4
    Label: Use Unique Passwords
    Description: Where multi-factor authentication is not supported (such as local administrator, root, or service accounts), accounts will use passwords that are unique to that system.
  • >

CIS Critical Security Controls V8.0:

  • Control 5: Account Management: -- More
    CIS Control Information
    Control: Use processes and tools to assign and manage authorization to credentials for user accounts, including administrator accounts, as well as service accounts, to enterprise assets and software.
    Safeguard: 5.2
    Label: Use Unique Passwords
    Description: Use unique passwords for all enterprise assets. Best practice implementation includes, at a minimum, an 8-character password for accounts using MFA and a 14-character password for accounts not using MFA.
    Implementation Group: IG-1
    Security Function: Protect
  • >

1.5 Additional Process Hardening

Pass

1.5.1 Ensure prelink is not installed

Description:

prelink is a program that modifies ELF shared libraries and ELF dynamically linked binaries in such a way that the time needed for the dynamic linker to perform relocations at startup significantly decreases.

The prelinking feature can interfere with the operation of AIDE, because it changes binaries. Prelinking can also increase the vulnerability of the system if a malicious user is able to compromise a common library such as libc.

Run the following command to restore binaries to normal:

# prelink -ua

Uninstall prelink using the appropriate package manager or manual installation:

# apt purge prelink

Show Assessment Evidence
Complex Check
AND
Criterion: Ensure package name equals 'prelink' is not installed
Existence Check: None Exist
Item Check: All
Result: Pass
No matching system items were found.


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.5.1_Ensure_prelink_is_not_installed"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.857-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>pass</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/9"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/14"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-6, CM-1, CM-3</xccdf:ident>
   <xccdf:complex-check operator="AND" negate="false">
      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                   negate="false"
                   multi-check="false">
         <xccdf:check-content-ref href="#OVAL-Results-1"
                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995023"/>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="definition"
                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995023">
               <div class="criteria">
                  <div class="criterion"
                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995023"
                       check="all"
                       check_existence="none_exist">
                     <table class="evidence-sep" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Criterion:</td>
                              <td>Ensure package name equals 'prelink' is not installed</td>
                           </tr>
                           <tr>
                              <td class="bold">Existence Check:</td>
                              <td>None Exist</td>
                           </tr>
                           <tr>
                              <td class="bold">Item Check:</td>
                              <td>All</td>
                           </tr>
                           <tr>
                              <td class="bold">Result:</td>
                              <td class="pass">Pass</td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <tr>
                           <td>No matching system items were found.</td>
                        </tr>
                     </table>
                  </div>
               </div>
            </div>
         </evidence>
      </xccdf:check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

  • URL: NIST SP 800-53 Rev. 5: CM-6, CM-1, CM-3

CIS Controls V7.0:

  • Control 14: Controlled Access Based on the Need to Know: -- More
    CIS Control Information
    Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
    Subcontrol: 14.9
    Label: Enforce Detail Logging for Access or Changes to Sensitive Data
    Description: Enforce detailed audit logging for access to sensitive data or changes to sensitive data (utilizing tools such as File Integrity Monitoring or Security Information and Event Monitoring).
  • >

CIS Critical Security Controls V8.0:

  • Control 3: Data Protection: -- More
    CIS Control Information
    Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
    Safeguard: 3.14
    Label: Log Sensitive Data Access
    Description: Log sensitive data access, including modification and disposal.
    Implementation Group: IG-3
    Security Function: Detect
  • >

Fail

1.5.2 Ensure address space layout randomization (ASLR) is enabled

Description:

Address space layout randomization (ASLR) is an exploit mitigation technique which randomly arranges the address space of key data areas of a process.

Randomly placing virtual memory regions will make it difficult to write memory page exploits as the memory placement will be consistently shifting.

Set the following parameter in /etc/sysctl.conf or a file in /etc/sysctl.d/ ending in .conf :

  • kernel.randomize_va_space = 2

Example:

# printf "

kernel.randomize_va_space = 2

" >> /etc/sysctl.d/60-kernel_sysctl.conf

Run the following command to set the active kernel parameter:

# sysctl -w kernel.randomize_va_space=2

Note: If these settings appear in a conically later file, or later in the same file, these settings will be overwritten

Show Assessment Evidence
Complex Check
AND
Script: sce/nix_kernel_parameter_chk_v2.sh
Result: Fail
Exit Value: 102
Output:
  • - Audit Result:
  • ** FAIL **
  • - Reason(s) for audit failure:
  • - "kernel.randomize_va_space" is not set in an included file
  • ** Note: "kernel.randomize_va_space" May be set in a file that's ignored by load procedure **
  • - Correctly set:
  • - "kernel.randomize_va_space" is correctly set to "2" in the running configuration
No error lines were collected.


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.5.2_Ensure_address_space_layout_randomization_ASLR_is_enabled"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.857-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>fail</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/8/subcontrol/3"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/10/subcontrol/5"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">http://manpages.ubuntu.com/manpages/focal/man5/sysctl.d.5.html</xccdf:ident>
   <xccdf:ident system="URL">CCI-000366: The organization implements the security configuration settings</xccdf:ident>
   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-6</xccdf:ident>
   <xccdf:complex-check operator="AND" negate="false">
      <xccdf:check system="http://open-scap.org/page/SCE"
                   negate="false"
                   multi-check="false">
         <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                             value-id="xccdf_org.cisecurity.benchmarks_value_3995027_var"/>
         <xccdf:check-content-ref href="sce/nix_kernel_parameter_chk_v2.sh"/>
         <xccdf:check-content>
            <command_result href="sce/nix_kernel_parameter_chk_v2.sh"
                            xccdf="fail"
                            script="/root/Assessor/sce/nix_kernel_parameter_chk_v2.sh"
                            exit-value="102">
               <out>
                  <l/>
                  <l>- Audit Result:</l>
                  <l>  ** FAIL **</l>
                  <l> - Reason(s) for audit failure:</l>
                  <l/>
                  <l> - "kernel.randomize_va_space" is not set in an included file</l>
                  <l>   ** Note: "kernel.randomize_va_space" May be set in a file that's ignored by load procedure **</l>
                  <l/>
                  <l/>
                  <l/>
                  <l>- Correctly set:</l>
                  <l/>
                  <l> - "kernel.randomize_va_space" is correctly set to "2" in the running configuration</l>
                  <l/>
               </out>
               <err/>
               <env/>
            </command_result>
         </xccdf:check-content>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="sce">
               <table class="evidence-sep" width="100%">
                  <tbody class="tbe">
                     <tr>
                        <td class="bold">Script:</td>
                        <td>sce/nix_kernel_parameter_chk_v2.sh</td>
                     </tr>
                     <tr>
                        <td class="bold">Result:</td>
                        <td class="fail">Fail</td>
                     </tr>
                     <tr>
                        <td class="bold">Exit Value:</td>
                        <td>102</td>
                     </tr>
                  </tbody>
               </table>
               <table class="evidence" width="100%">
                  <tbody class="tbe">
                     <tr>
                        <td class="bold">Output:</td>
                        <td>
                           <ul class="unstyled">
                              <li/>
                              <li>- Audit Result:</li>
                              <li>  ** FAIL **</li>
                              <li> - Reason(s) for audit failure:</li>
                              <li/>
                              <li> - "kernel.randomize_va_space" is not set in an included file</li>
                              <li>   ** Note: "kernel.randomize_va_space" May be set in a file that's ignored by load procedure **</li>
                              <li/>
                              <li/>
                              <li/>
                              <li>- Correctly set:</li>
                              <li/>
                              <li> - "kernel.randomize_va_space" is correctly set to "2" in the running configuration</li>
                              <li/>
                           </ul>
                        </td>
                     </tr>
                  </tbody>
               </table>
               <table class="evidence" width="100%">
                  <tbody class="tbe">
                     <tr>
                        <td>No error lines were collected.</td>
                     </tr>
                  </tbody>
               </table>
            </div>
         </evidence>
      </xccdf:check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

  • URL: http://manpages.ubuntu.com/manpages/focal/man5/sysctl.d.5.html
  • URL: CCI-000366: The organization implements the security configuration settings
  • URL: NIST SP 800-53 Rev. 5: CM-6

CIS Controls V7.0:

  • Control 8: Malware Defenses: -- More
    CIS Control Information
    Control: Control the installation, spread, and execution of malicious code at multiple points in the enterprise, while optimizing the use of automation to enable rapid updating of defense, data gathering, and corrective action.
    Subcontrol: 8.3
    Label: Enable Operating System Anti-Exploitation Features/ Deploy Anti-Exploit Technologies
    Description: Enable anti-exploitation features such as Data Execution Prevention (DEP) or Address Space Layout Randomization (ASLR) that are available in an operating system or deploy appropriate toolkits that can be configured to apply protection to a broader set of applications and executables.
  • >

CIS Critical Security Controls V8.0:

  • Control 10: Malware Defenses: -- More
    CIS Control Information
    Control: Prevent or control the installation, spread, and execution of malicious applications, code, or scripts on enterprise assets.
    Safeguard: 10.5
    Label: Enable Anti-Exploitation Features
    Description: Enable anti-exploitation features on enterprise assets and software, where possible, such as Microsoft® Data Execution Prevention (DEP), Windows® Defender Exploit Guard (WDEG), or Apple® System Integrity Protection (SIP) and Gatekeeper™.
    Implementation Group: IG-2
    Security Function: Protect
  • >

Pass

1.5.3 Ensure ptrace_scope is restricted

Description:

The ptrace() system call provides a means by which one process (the "tracer") may observe and control the execution of another process (the "tracee"), and examine and change the tracee's memory and registers.

If one application is compromised, it would be possible for an attacker to attach to other running processes (e.g. Bash, Firefox, SSH sessions, GPG agent, etc) to extract additional credentials and continue to expand the scope of their attack.

Enabling restricted mode will limit the ability of a compromised process to PTRACE_ATTACH on other processes running under the same user. With restricted mode, ptrace will continue to work with root user.

Set the following parameter in /etc/sysctl.conf or a file in /etc/sysctl.d/ ending in .conf :

  • kernel.yama.ptrace_scope = 1

Example:

# printf "

kernel.yama.ptrace_scope = 1

" >> /etc/sysctl.d/60-kernel_sysctl.conf

Run the following command to set the active kernel parameter:

# sysctl -w kernel.yama.ptrace_scope=1

Note: If these settings appear in a conically later file, or later in the same file, these settings will be overwritten

Show Assessment Evidence
Complex Check
AND
Script: sce/nix_kernel_parameter_chk_v2.sh
Result: Pass
Exit Value: 101
Output:
  • - Audit Result:
  • ** PASS **
  • - "kernel.yama.ptrace_scope" is correctly set to "1" in the running configuration
  • - "kernel.yama.ptrace_scope" is correctly set to "1" in "/etc/sysctl.d/10-ptrace.conf"
No error lines were collected.


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.5.3_Ensure_ptrace_scope_is_restricted"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.857-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>pass</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:ident system="URL">https://www.kernel.org/doc/Documentation/security/Yama.txt</xccdf:ident>
   <xccdf:ident system="URL">https://github.com/raj3shp/termspy</xccdf:ident>
   <xccdf:complex-check operator="AND" negate="false">
      <xccdf:check system="http://open-scap.org/page/SCE"
                   negate="false"
                   multi-check="false">
         <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                             value-id="xccdf_org.cisecurity.benchmarks_value_3995030_var"/>
         <xccdf:check-content-ref href="sce/nix_kernel_parameter_chk_v2.sh"/>
         <xccdf:check-content>
            <command_result href="sce/nix_kernel_parameter_chk_v2.sh"
                            xccdf="pass"
                            script="/root/Assessor/sce/nix_kernel_parameter_chk_v2.sh"
                            exit-value="101">
               <out>
                  <l/>
                  <l>- Audit Result:</l>
                  <l>  ** PASS **</l>
                  <l/>
                  <l> - "kernel.yama.ptrace_scope" is correctly set to "1" in the running configuration</l>
                  <l> - "kernel.yama.ptrace_scope" is correctly set to "1" in "/etc/sysctl.d/10-ptrace.conf"</l>
                  <l/>
                  <l/>
               </out>
               <err/>
               <env/>
            </command_result>
         </xccdf:check-content>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="sce">
               <table class="evidence-sep" width="100%">
                  <tbody class="tbe">
                     <tr>
                        <td class="bold">Script:</td>
                        <td>sce/nix_kernel_parameter_chk_v2.sh</td>
                     </tr>
                     <tr>
                        <td class="bold">Result:</td>
                        <td class="pass">Pass</td>
                     </tr>
                     <tr>
                        <td class="bold">Exit Value:</td>
                        <td>101</td>
                     </tr>
                  </tbody>
               </table>
               <table class="evidence" width="100%">
                  <tbody class="tbe">
                     <tr>
                        <td class="bold">Output:</td>
                        <td>
                           <ul class="unstyled">
                              <li/>
                              <li>- Audit Result:</li>
                              <li>  ** PASS **</li>
                              <li/>
                              <li> - "kernel.yama.ptrace_scope" is correctly set to "1" in the running configuration</li>
                              <li> - "kernel.yama.ptrace_scope" is correctly set to "1" in "/etc/sysctl.d/10-ptrace.conf"</li>
                              <li/>
                              <li/>
                           </ul>
                        </td>
                     </tr>
                  </tbody>
               </table>
               <table class="evidence" width="100%">
                  <tbody class="tbe">
                     <tr>
                        <td>No error lines were collected.</td>
                     </tr>
                  </tbody>
               </table>
            </div>
         </evidence>
      </xccdf:check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

  • URL: https://www.kernel.org/doc/Documentation/security/Yama.txt
  • URL: https://github.com/raj3shp/termspy

CIS Controls V7.0:

  • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
    CIS Control Information
    Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
    Subcontrol: 9.2
    Label: Ensure Only Approved Ports, Protocols and Services Are Running
    Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
  • >

CIS Critical Security Controls V8.0:

  • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
    CIS Control Information
    Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
    Safeguard: 4.8
    Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
    Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
    Implementation Group: IG-2
    Security Function: Protect
  • >

Pass

1.5.4 Ensure Automatic Error Reporting is not enabled

Description:

The Apport Error Reporting Service automatically generates crash reports for debugging

Apport collects potentially sensitive data, such as core dumps, stack traces, and log files. They can contain passwords, credit card numbers, serial numbers, and other private material.

Edit /etc/default/apport and add or edit the enabled parameter to equal 0 :

enabled=0

Run the following commands to stop and disable the apport service

# systemctl stop apport.service

# systemctl --now disable apport.service

-- OR --

Run the following command to remove the apport package:

# apt purge apport

Show Assessment Evidence
Complex Check
OR
Complex Check
AND
Criterion: Ensure at least one file named /etc/default/apport exists and matches pattern ^\h*enabled\h*=\h*0\b
Existence Check: At Least One Exists
Item Check: All
Result: Fail
No matching system items were found.
Criterion: Ensure systemd 'apport.service' unit 'ActiveState' property not equal 'active'
Existence Check: At Least One Exists
Item Check: All
Result: Pass
Systemdunitproperty Item
Name Type Status Value
Unit String Exists apport.service
Property String Exists ActiveState
Value String Exists inactive
Criterion: Ensure package name equals 'apport' is not installed
Existence Check: None Exist
Item Check: All
Result: Pass
No matching system items were found.


Show Rule Result XML
<xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                   idref="xccdf_org.cisecurity.benchmarks_rule_1.5.4_Ensure_Automatic_Error_Reporting_is_not_enabled"
                   role="full"
                   severity="unknown"
                   time="2024-04-14T23:46:23.857-04:00"
                   version="1"
                   weight="1.0">
   <xccdf:result>pass</xccdf:result>
   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                system="http://cisecurity.org/20-cc/v7.0"/>
   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                system="http://cisecurity.org/20-cc/v8.0"/>
   <xccdf:complex-check operator="OR" negate="false">
      <xccdf:complex-check operator="AND" negate="false">
         <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                      negate="false"
                      multi-check="false">
            <xccdf:check-content-ref href="#OVAL-Results-1"
                                     name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995034"/>
            <evidence xmlns="http://cisecurity.org/evidence">
               <div class="definition"
                    id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995034">
                  <div class="criteria">
                     <div class="criterion"
                          id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995034"
                          check="all"
                          check_existence="at_least_one_exists">
                        <table class="evidence-sep" width="100%">
                           <tbody class="tbe">
                              <tr>
                                 <td class="bold">Criterion:</td>
                                 <td>Ensure at least one file named /etc/default/apport exists and matches pattern ^\h*enabled\h*=\h*0\b</td>
                              </tr>
                              <tr>
                                 <td class="bold">Existence Check:</td>
                                 <td>At Least One Exists</td>
                              </tr>
                              <tr>
                                 <td class="bold">Item Check:</td>
                                 <td>All</td>
                              </tr>
                              <tr>
                                 <td class="bold">Result:</td>
                                 <td class="fail">Fail</td>
                              </tr>
                           </tbody>
                        </table>
                        <table class="evidence" width="100%">
                           <tr>
                              <td>No matching system items were found.</td>
                           </tr>
                        </table>
                     </div>
                  </div>
               </div>
            </evidence>
         </xccdf:check>
         <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                      negate="false"
                      multi-check="false">
            <xccdf:check-export export-name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3995038"
                                value-id="xccdf_org.cisecurity.benchmarks_value_3995038_var"/>
            <xccdf:check-content-ref href="#OVAL-Results-1"
                                     name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995038"/>
            <evidence xmlns="http://cisecurity.org/evidence">
               <div class="definition"
                    id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995038">
                  <div class="criteria">
                     <div class="criterion"
                          id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995038"
                          check="all"
                          check_existence="at_least_one_exists">
                        <table class="evidence-sep" width="100%">
                           <tbody class="tbe">
                              <tr>
                                 <td class="bold">Criterion:</td>
                                 <td>Ensure systemd 'apport.service' unit 'ActiveState' property not equal 'active'</td>
                              </tr>
                              <tr>
                                 <td class="bold">Existence Check:</td>
                                 <td>At Least One Exists</td>
                              </tr>
                              <tr>
                                 <td class="bold">Item Check:</td>
                                 <td>All</td>
                              </tr>
                              <tr>
                                 <td class="bold">Result:</td>
                                 <td class="pass">Pass</td>
                              </tr>
                           </tbody>
                        </table>
                        <table class="evidence" width="100%">
                           <caption>Systemdunitproperty Item</caption>
                           <thead>
                              <tr>
                                 <th scope="col">Name</th>
                                 <th scope="col">Type</th>
                                 <th scope="col">Status</th>
                                 <th scope="col">Value</th>
                              </tr>
                           </thead>
                           <tbody class="tbe">
                              <tr>
                                 <td>Unit</td>
                                 <td>String</td>
                                 <td>Exists</td>
                                 <td>apport.service</td>
                              </tr>
                              <tr>
                                 <td>Property</td>
                                 <td>String</td>
                                 <td>Exists</td>
                                 <td>ActiveState</td>
                              </tr>
                              <tr class="evaluated">
                                 <td>Value</td>
                                 <td>String</td>
                                 <td>Exists</td>
                                 <td>inactive</td>
                              </tr>
                           </tbody>
                        </table>
                     </div>
                  </div>
               </div>
            </evidence>
         </xccdf:check>
      </xccdf:complex-check>
      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                   negate="false"
                   multi-check="false">
         <xccdf:check-content-ref href="#OVAL-Results-1"
                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995042"/>
         <evidence xmlns="http://cisecurity.org/evidence">
            <div class="definition"
                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995042">
               <div class="criteria">
                  <div class="criterion"
                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995042"
                       check="all"
                       check_existence="none_exist">
                     <table class="evidence-sep" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Criterion:</td>
                              <td>Ensure package name equals 'apport' is not installed</td>
                           </tr>
                           <tr>
                              <td class="bold">Existence Check:</td>
                              <td>None Exist</td>
                           </tr>
                           <tr>
                              <td class="bold">Item Check:</td>
                              <td>All</td>
                           </tr>
                           <tr>
                              <td class="bold">Result:</td>
                              <td class="pass">Pass</td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <tr>
                           <td>No matching system items were found.</td>
                        </tr>
                     </table>
                  </div>
               </div>
            </div>
         </evidence>
      </xccdf:check>
   </xccdf:complex-check>
</xccdf:rule-result>

References:

    CIS Controls V7.0:

    • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
      CIS Control Information
      Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
      Subcontrol: 9.2
      Label: Ensure Only Approved Ports, Protocols and Services Are Running
      Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
    • >

    CIS Critical Security Controls V8.0:

    • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
      CIS Control Information
      Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
      Safeguard: 4.8
      Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
      Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
      Implementation Group: IG-2
      Security Function: Protect
    • >

    Fail

    1.5.5 Ensure core dumps are restricted

    Description:

    A core dump is the memory of an executable program. It is generally used to determine why a program aborted. It can also be used to glean confidential information from a core file. The system provides the ability to set a soft limit for core dumps, but this can be overridden by the user.

    Setting a hard limit on core dumps prevents users from overriding the soft variable. If core dumps are required, consider setting limits for user groups (see limits.conf(5) ). In addition, setting the fs.suid_dumpable variable to 0 will prevent setuid programs from dumping core.

    Add the following line to /etc/security/limits.conf or a /etc/security/limits.d/* file:

    * hard core 0

    Set the following parameter in /etc/sysctl.conf or a file in /etc/sysctl.d/ ending in .conf :

    • fs.suid_dumpable = 0

    Example:

    # printf "

    fs.suid_dumpable = 0

    " >> /etc/sysctl.d/60-fs_sysctl.conf

    Run the following command to set the active kernel parameter:

    # sysctl -w fs.suid_dumpable=0

    Note: If these settings appear in a conically later file, or later in the same file, these settings will be overwritten

    -IF- systemd-coredump is installed:

    edit /etc/systemd/coredump.conf and add/modify the following lines:

    Storage=none

    ProcessSizeMax=0

    Run the command:

    systemctl daemon-reload

    Show Assessment Evidence
    Complex Check
    AND
    Complex Check
    OR
    Criterion: Ensure at least one file named /etc/security/limits.conf exists and matches pattern ^\h*\*\h+hard\h+core\h+0\b(\h*#.*)?$
    Existence Check: At Least One Exists
    Item Check: All
    Result: Fail
    No matching system items were found.
    Criterion: Ensure at least one file(s) named ^.+$ in /etc/security/limits.d exists and matches pattern ^\h*\*\h+hard\h+core\h+0\b(\h*#.*)?$
    Existence Check: At Least One Exists
    Item Check: All
    Result: Fail
    No matching system items were found.
    Script: sce/nix_kernel_parameter_chk_v2.sh
    Result: Fail
    Exit Value: 102
    Output:
    • - Audit Result:
    • ** FAIL **
    • - Reason(s) for audit failure:
    • - "fs.suid_dumpable" is incorrectly set to "2" in the running configuration and should have a value of: "0"
    • - "fs.suid_dumpable" is not set in an included file
    • ** Note: "fs.suid_dumpable" May be set in a file that's ignored by load procedure **
    No error lines were collected.


    Show Rule Result XML
    <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                       xmlns:notes="http://benchmarks.cisecurity.org/notes"
                       xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                       xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                       xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                       xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                       xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                       xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                       xmlns="http://checklists.nist.gov/xccdf/1.2"
                       xmlns:xhtml="http://www.w3.org/1999/xhtml"
                       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                       xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                       xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                       xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                       xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                       idref="xccdf_org.cisecurity.benchmarks_rule_1.5.5_Ensure_core_dumps_are_restricted"
                       role="full"
                       severity="unknown"
                       time="2024-04-14T23:46:23.857-04:00"
                       version="1"
                       weight="1.0">
       <xccdf:result>fail</xccdf:result>
       <xccdf:complex-check operator="AND" negate="false">
          <xccdf:complex-check operator="OR" negate="false">
             <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                          negate="false"
                          multi-check="false">
                <xccdf:check-content-ref href="#OVAL-Results-1"
                                         name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995046"/>
                <evidence xmlns="http://cisecurity.org/evidence">
                   <div class="definition"
                        id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995046">
                      <div class="criteria">
                         <div class="criterion"
                              id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995046"
                              check="all"
                              check_existence="at_least_one_exists">
                            <table class="evidence-sep" width="100%">
                               <tbody class="tbe">
                                  <tr>
                                     <td class="bold">Criterion:</td>
                                     <td>Ensure at least one file named /etc/security/limits.conf exists and matches pattern ^\h*\*\h+hard\h+core\h+0\b(\h*#.*)?$</td>
                                  </tr>
                                  <tr>
                                     <td class="bold">Existence Check:</td>
                                     <td>At Least One Exists</td>
                                  </tr>
                                  <tr>
                                     <td class="bold">Item Check:</td>
                                     <td>All</td>
                                  </tr>
                                  <tr>
                                     <td class="bold">Result:</td>
                                     <td class="fail">Fail</td>
                                  </tr>
                               </tbody>
                            </table>
                            <table class="evidence" width="100%">
                               <tr>
                                  <td>No matching system items were found.</td>
                               </tr>
                            </table>
                         </div>
                      </div>
                   </div>
                </evidence>
             </xccdf:check>
             <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                          negate="false"
                          multi-check="false">
                <xccdf:check-content-ref href="#OVAL-Results-1"
                                         name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995049"/>
                <evidence xmlns="http://cisecurity.org/evidence">
                   <div class="definition"
                        id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995049">
                      <div class="criteria">
                         <div class="criterion"
                              id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995049"
                              check="all"
                              check_existence="at_least_one_exists">
                            <table class="evidence-sep" width="100%">
                               <tbody class="tbe">
                                  <tr>
                                     <td class="bold">Criterion:</td>
                                     <td>Ensure at least one file(s) named ^.+$ in /etc/security/limits.d exists and matches pattern ^\h*\*\h+hard\h+core\h+0\b(\h*#.*)?$</td>
                                  </tr>
                                  <tr>
                                     <td class="bold">Existence Check:</td>
                                     <td>At Least One Exists</td>
                                  </tr>
                                  <tr>
                                     <td class="bold">Item Check:</td>
                                     <td>All</td>
                                  </tr>
                                  <tr>
                                     <td class="bold">Result:</td>
                                     <td class="fail">Fail</td>
                                  </tr>
                               </tbody>
                            </table>
                            <table class="evidence" width="100%">
                               <tr>
                                  <td>No matching system items were found.</td>
                               </tr>
                            </table>
                         </div>
                      </div>
                   </div>
                </evidence>
             </xccdf:check>
          </xccdf:complex-check>
          <xccdf:check system="http://open-scap.org/page/SCE"
                       negate="false"
                       multi-check="false">
             <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                 value-id="xccdf_org.cisecurity.benchmarks_value_3995053_var"/>
             <xccdf:check-content-ref href="sce/nix_kernel_parameter_chk_v2.sh"/>
             <xccdf:check-content>
                <command_result href="sce/nix_kernel_parameter_chk_v2.sh"
                                xccdf="fail"
                                script="/root/Assessor/sce/nix_kernel_parameter_chk_v2.sh"
                                exit-value="102">
                   <out>
                      <l/>
                      <l>- Audit Result:</l>
                      <l>  ** FAIL **</l>
                      <l> - Reason(s) for audit failure:</l>
                      <l/>
                      <l> - "fs.suid_dumpable" is incorrectly set to "2" in the running configuration and should have a value of: "0"</l>
                      <l> - "fs.suid_dumpable" is not set in an included file</l>
                      <l>   ** Note: "fs.suid_dumpable" May be set in a file that's ignored by load procedure **</l>
                      <l/>
                      <l/>
                   </out>
                   <err/>
                   <env/>
                </command_result>
             </xccdf:check-content>
             <evidence xmlns="http://cisecurity.org/evidence">
                <div class="sce">
                   <table class="evidence-sep" width="100%">
                      <tbody class="tbe">
                         <tr>
                            <td class="bold">Script:</td>
                            <td>sce/nix_kernel_parameter_chk_v2.sh</td>
                         </tr>
                         <tr>
                            <td class="bold">Result:</td>
                            <td class="fail">Fail</td>
                         </tr>
                         <tr>
                            <td class="bold">Exit Value:</td>
                            <td>102</td>
                         </tr>
                      </tbody>
                   </table>
                   <table class="evidence" width="100%">
                      <tbody class="tbe">
                         <tr>
                            <td class="bold">Output:</td>
                            <td>
                               <ul class="unstyled">
                                  <li/>
                                  <li>- Audit Result:</li>
                                  <li>  ** FAIL **</li>
                                  <li> - Reason(s) for audit failure:</li>
                                  <li/>
                                  <li> - "fs.suid_dumpable" is incorrectly set to "2" in the running configuration and should have a value of: "0"</li>
                                  <li> - "fs.suid_dumpable" is not set in an included file</li>
                                  <li>   ** Note: "fs.suid_dumpable" May be set in a file that's ignored by load procedure **</li>
                                  <li/>
                                  <li/>
                               </ul>
                            </td>
                         </tr>
                      </tbody>
                   </table>
                   <table class="evidence" width="100%">
                      <tbody class="tbe">
                         <tr>
                            <td>No error lines were collected.</td>
                         </tr>
                      </tbody>
                   </table>
                </div>
             </evidence>
          </xccdf:check>
       </xccdf:complex-check>
    </xccdf:rule-result>
    

    1.6 Mandatory Access Control

    Mandatory Access Control (MAC) provides an additional layer of access restrictions to processes on top of the base Discretionary Access Controls. By restricting how processes can access files and resources on a system the potential impact from vulnerabilities in the processes can be reduced.

    Impact: Mandatory Access Control limits the capabilities of applications and daemons on a system, while this can prevent unauthorized access the configuration of MAC can be complex and difficult to implement correctly preventing legitimate access from occurring.

    Note:

    • Apparmor is the default MAC provided with Debian-based systems.
    • Additional Mandatory Access Control systems to include SELinux exist. If a different Mandatory Access Control systems is used, please follow it's vendors guidance for proper implementation in place of the guidance provided in this section

    1.6.1 Configure AppArmor

    AppArmor provides a Mandatory Access Control (MAC) system that greatly augments the default Discretionary Access Control (DAC) model. Under AppArmor MAC rules are applied by file paths instead of by security contexts as in other MAC systems. As such it does not require support in the filesystem and can be applied to network mounted filesystems for example. AppArmor security policies define what system resources applications can access and what privileges they can do so with. This automatically limits the damage that the software can do to files accessible by the calling user. The user does not need to take any action to gain this benefit. For an action to occur, both the traditional DAC permissions must be satisfied as well as the AppArmor MAC rules. The action will not be allowed if either one of these models does not permit the action. In this way, AppArmor rules can only make a system's permissions more restrictive and secure.

    References:

    1. AppArmor Documentation: http://wiki.apparmor.net/index.php/Documentation
    2. Ubuntu AppArmor Documentation: https://help.ubuntu.com/community/AppArmor
    3. SUSE AppArmor Documentation: https://www.suse.com/documentation/apparmor/
    Fail

    1.6.1.1 Ensure AppArmor is installed

    Description:

    AppArmor provides Mandatory Access Controls.

    Without a Mandatory Access Control system installed only the default Discretionary Access Control system will be available.

    Install AppArmor.

    # apt install apparmor apparmor-utils

    Show Assessment Evidence
    Complex Check
    AND
    Criterion: Ensure package name equals 'apparmor' is installed
    Existence Check: At Least One Exists
    Item Check: All
    Result: Fail
    No matching system items were found.
    Criterion: Ensure package name equals 'apparmor-utils' is installed
    Existence Check: At Least One Exists
    Item Check: All
    Result: Fail
    No matching system items were found.


    Show Rule Result XML
    <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                       xmlns:notes="http://benchmarks.cisecurity.org/notes"
                       xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                       xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                       xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                       xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                       xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                       xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                       xmlns="http://checklists.nist.gov/xccdf/1.2"
                       xmlns:xhtml="http://www.w3.org/1999/xhtml"
                       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                       xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                       xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                       xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                       xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                       idref="xccdf_org.cisecurity.benchmarks_rule_1.6.1.1_Ensure_AppArmor_is_installed"
                       role="full"
                       severity="unknown"
                       time="2024-04-14T23:46:23.858-04:00"
                       version="1"
                       weight="1.0">
       <xccdf:result>fail</xccdf:result>
       <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                    system="http://cisecurity.org/20-cc/v7.0"/>
       <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                    system="http://cisecurity.org/20-cc/v8.0"/>
       <xccdf:complex-check operator="AND" negate="false">
          <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                       negate="false"
                       multi-check="false">
             <xccdf:check-content-ref href="#OVAL-Results-1"
                                      name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995058"/>
             <evidence xmlns="http://cisecurity.org/evidence">
                <div class="definition"
                     id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995058">
                   <div class="criteria">
                      <div class="criterion"
                           id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995058"
                           check="all"
                           check_existence="at_least_one_exists">
                         <table class="evidence-sep" width="100%">
                            <tbody class="tbe">
                               <tr>
                                  <td class="bold">Criterion:</td>
                                  <td>Ensure package name equals 'apparmor' is installed</td>
                               </tr>
                               <tr>
                                  <td class="bold">Existence Check:</td>
                                  <td>At Least One Exists</td>
                               </tr>
                               <tr>
                                  <td class="bold">Item Check:</td>
                                  <td>All</td>
                               </tr>
                               <tr>
                                  <td class="bold">Result:</td>
                                  <td class="fail">Fail</td>
                               </tr>
                            </tbody>
                         </table>
                         <table class="evidence" width="100%">
                            <tr>
                               <td>No matching system items were found.</td>
                            </tr>
                         </table>
                      </div>
                   </div>
                </div>
             </evidence>
          </xccdf:check>
          <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                       negate="false"
                       multi-check="false">
             <xccdf:check-content-ref href="#OVAL-Results-1"
                                      name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995061"/>
             <evidence xmlns="http://cisecurity.org/evidence">
                <div class="definition"
                     id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995061">
                   <div class="criteria">
                      <div class="criterion"
                           id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995061"
                           check="all"
                           check_existence="at_least_one_exists">
                         <table class="evidence-sep" width="100%">
                            <tbody class="tbe">
                               <tr>
                                  <td class="bold">Criterion:</td>
                                  <td>Ensure package name equals 'apparmor-utils' is installed</td>
                               </tr>
                               <tr>
                                  <td class="bold">Existence Check:</td>
                                  <td>At Least One Exists</td>
                               </tr>
                               <tr>
                                  <td class="bold">Item Check:</td>
                                  <td>All</td>
                               </tr>
                               <tr>
                                  <td class="bold">Result:</td>
                                  <td class="fail">Fail</td>
                               </tr>
                            </tbody>
                         </table>
                         <table class="evidence" width="100%">
                            <tr>
                               <td>No matching system items were found.</td>
                            </tr>
                         </table>
                      </div>
                   </div>
                </div>
             </evidence>
          </xccdf:check>
       </xccdf:complex-check>
    </xccdf:rule-result>
    

    References:

      CIS Controls V7.0:

      • Control 14: Controlled Access Based on the Need to Know: -- More
        CIS Control Information
        Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
        Subcontrol: 14.6
        Label: Protect Information through Access Control Lists
        Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
      • >

      CIS Critical Security Controls V8.0:

      • Control 3: Data Protection: -- More
        CIS Control Information
        Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
        Safeguard: 3.3
        Label: Configure Data Access Control Lists
        Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
        Implementation Group: IG-1
        Security Function: Protect
      • >

      Fail

      1.6.1.2 Ensure AppArmor is enabled in the bootloader configuration

      Description:

      Configure AppArmor to be enabled at boot time and verify that it has not been overwritten by the bootloader boot parameters.

      Note: This recommendation is designed around the grub bootloader, if LILO or another bootloader is in use in your environment enact equivalent settings.

      AppArmor must be enabled at boot time in your bootloader configuration to ensure that the controls it provides are not overridden.

      Edit /etc/default/grub and add the apparmor=1 and security=apparmor parameters to the GRUB_CMDLINE_LINUX= line

      GRUB_CMDLINE_LINUX="apparmor=1 security=apparmor"

      Run the following command to update the grub2 configuration:

      # update-grub

      Show Assessment Evidence
      Complex Check
      AND
      Criterion: Ensure /boot/grub/grub.cfg contents Pattern Match apparmor=1 (string)
      Existence Check: At Least One Exists
      Item Check: All
      Result: Fail
      No matching system items were found.
      Criterion: Ensure /boot/grub/grub.cfg contents Pattern Match security=apparmor (string)
      Existence Check: At Least One Exists
      Item Check: All
      Result: Fail
      No matching system items were found.


      Show Rule Result XML
      <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                         xmlns:notes="http://benchmarks.cisecurity.org/notes"
                         xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                         xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                         xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                         xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                         xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                         xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                         xmlns="http://checklists.nist.gov/xccdf/1.2"
                         xmlns:xhtml="http://www.w3.org/1999/xhtml"
                         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                         xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                         xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                         xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                         xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                         idref="xccdf_org.cisecurity.benchmarks_rule_1.6.1.2_Ensure_AppArmor_is_enabled_in_the_bootloader_configuration"
                         role="full"
                         severity="unknown"
                         time="2024-04-14T23:46:23.858-04:00"
                         version="1"
                         weight="1.0">
         <xccdf:result>fail</xccdf:result>
         <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                      system="http://cisecurity.org/20-cc/v7.0"/>
         <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                      system="http://cisecurity.org/20-cc/v8.0"/>
         <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3</xccdf:ident>
         <xccdf:complex-check operator="AND" negate="false">
            <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                         negate="false"
                         multi-check="false">
               <xccdf:check-export export-name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3995064"
                                   value-id="xccdf_org.cisecurity.benchmarks_value_39950641_var"/>
               <xccdf:check-export export-name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:39950642"
                                   value-id="xccdf_org.cisecurity.benchmarks_value_39950642_var"/>
               <xccdf:check-content-ref href="#OVAL-Results-1"
                                        name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995064"/>
               <evidence xmlns="http://cisecurity.org/evidence">
                  <div class="definition"
                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995064">
                     <div class="criteria">
                        <div class="criterion"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995064"
                             check="all"
                             check_existence="at_least_one_exists">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Criterion:</td>
                                    <td>Ensure /boot/grub/grub.cfg contents Pattern Match apparmor=1 (string)</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Existence Check:</td>
                                    <td>At Least One Exists</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Item Check:</td>
                                    <td>All</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tr>
                                 <td>No matching system items were found.</td>
                              </tr>
                           </table>
                        </div>
                     </div>
                  </div>
               </evidence>
            </xccdf:check>
            <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                         negate="false"
                         multi-check="false">
               <xccdf:check-export export-name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3995069"
                                   value-id="xccdf_org.cisecurity.benchmarks_value_39950691_var"/>
               <xccdf:check-export export-name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:39950692"
                                   value-id="xccdf_org.cisecurity.benchmarks_value_39950692_var"/>
               <xccdf:check-content-ref href="#OVAL-Results-1"
                                        name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995069"/>
               <evidence xmlns="http://cisecurity.org/evidence">
                  <div class="definition"
                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995069">
                     <div class="criteria">
                        <div class="criterion"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995069"
                             check="all"
                             check_existence="at_least_one_exists">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Criterion:</td>
                                    <td>Ensure /boot/grub/grub.cfg contents Pattern Match security=apparmor (string)</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Existence Check:</td>
                                    <td>At Least One Exists</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Item Check:</td>
                                    <td>All</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tr>
                                 <td>No matching system items were found.</td>
                              </tr>
                           </table>
                        </div>
                     </div>
                  </div>
               </evidence>
            </xccdf:check>
         </xccdf:complex-check>
      </xccdf:rule-result>
      

      References:

      • URL: NIST SP 800-53 Rev. 5: AC-3

      CIS Controls V7.0:

      • Control 14: Controlled Access Based on the Need to Know: -- More
        CIS Control Information
        Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
        Subcontrol: 14.6
        Label: Protect Information through Access Control Lists
        Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
      • >

      CIS Critical Security Controls V8.0:

      • Control 3: Data Protection: -- More
        CIS Control Information
        Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
        Safeguard: 3.3
        Label: Configure Data Access Control Lists
        Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
        Implementation Group: IG-1
        Security Function: Protect
      • >

      Fail

      1.6.1.3 Ensure all AppArmor Profiles are in enforce or complain mode

      Description:

      AppArmor profiles define what resources applications are able to access.

      Security configuration requirements vary from site to site. Some sites may mandate a policy that is stricter than the default policy, which is perfectly acceptable. This item is intended to ensure that any policies that exist on the system are activated.

      Run the following command to set all profiles to enforce mode:

      # aa-enforce /etc/apparmor.d/*

      OR

      Run the following command to set all profiles to complain mode:

      # aa-complain /etc/apparmor.d/*

      Note: Any unconfined processes may need to have a profile created or activated for them and then be restarted

      Show Assessment Evidence
      Complex Check
      AND
      Script: sce/nix_apparmor_profiles_chk.sh
      Result: Fail
      Exit Value: 102
      Output:
      • - Audit Result:
      • ** FAIL **
      • - * Reasons for audit failure * :
      • - Command "apparmor_status" doesn't exist.
      • - Confirm AppArmor is installed
      No error lines were collected.


      Show Rule Result XML
      <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                         xmlns:notes="http://benchmarks.cisecurity.org/notes"
                         xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                         xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                         xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                         xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                         xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                         xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                         xmlns="http://checklists.nist.gov/xccdf/1.2"
                         xmlns:xhtml="http://www.w3.org/1999/xhtml"
                         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                         xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                         xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                         xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                         xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                         idref="xccdf_org.cisecurity.benchmarks_rule_1.6.1.3_Ensure_all_AppArmor_Profiles_are_in_enforce_or_complain_mode"
                         role="full"
                         severity="unknown"
                         time="2024-04-14T23:46:23.858-04:00"
                         version="1"
                         weight="1.0">
         <xccdf:result>fail</xccdf:result>
         <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                      system="http://cisecurity.org/20-cc/v7.0"/>
         <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                      system="http://cisecurity.org/20-cc/v8.0"/>
         <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3</xccdf:ident>
         <xccdf:complex-check operator="AND" negate="false">
            <xccdf:check system="http://open-scap.org/page/SCE"
                         negate="false"
                         multi-check="false">
               <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                   value-id="xccdf_org.cisecurity.benchmarks_value_3995072_var"/>
               <xccdf:check-content-ref href="sce/nix_apparmor_profiles_chk.sh"/>
               <xccdf:check-content>
                  <command_result href="sce/nix_apparmor_profiles_chk.sh"
                                  xccdf="fail"
                                  script="/root/Assessor/sce/nix_apparmor_profiles_chk.sh"
                                  exit-value="102">
                     <out>
                        <l/>
                        <l>- Audit Result:</l>
                        <l>  ** FAIL **</l>
                        <l> - * Reasons for audit failure * :</l>
                        <l/>
                        <l> - Command "apparmor_status" doesn't exist.</l>
                        <l>  - Confirm AppArmor is installed</l>
                        <l/>
                     </out>
                     <err/>
                     <env/>
                  </command_result>
               </xccdf:check-content>
               <evidence xmlns="http://cisecurity.org/evidence">
                  <div class="sce">
                     <table class="evidence-sep" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Script:</td>
                              <td>sce/nix_apparmor_profiles_chk.sh</td>
                           </tr>
                           <tr>
                              <td class="bold">Result:</td>
                              <td class="fail">Fail</td>
                           </tr>
                           <tr>
                              <td class="bold">Exit Value:</td>
                              <td>102</td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Output:</td>
                              <td>
                                 <ul class="unstyled">
                                    <li/>
                                    <li>- Audit Result:</li>
                                    <li>  ** FAIL **</li>
                                    <li> - * Reasons for audit failure * :</li>
                                    <li/>
                                    <li> - Command "apparmor_status" doesn't exist.</li>
                                    <li>  - Confirm AppArmor is installed</li>
                                    <li/>
                                 </ul>
                              </td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td>No error lines were collected.</td>
                           </tr>
                        </tbody>
                     </table>
                  </div>
               </evidence>
            </xccdf:check>
         </xccdf:complex-check>
      </xccdf:rule-result>
      

      References:

      • URL: NIST SP 800-53 Rev. 5: AC-3

      CIS Controls V7.0:

      • Control 14: Controlled Access Based on the Need to Know: -- More
        CIS Control Information
        Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
        Subcontrol: 14.6
        Label: Protect Information through Access Control Lists
        Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
      • >

      CIS Critical Security Controls V8.0:

      • Control 3: Data Protection: -- More
        CIS Control Information
        Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
        Safeguard: 3.3
        Label: Configure Data Access Control Lists
        Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
        Implementation Group: IG-1
        Security Function: Protect
      • >

      1.7 Command Line Warning Banners

      Presenting a warning message prior to the normal user login may assist in the prosecution of trespassers on the computer system. Changing some of these login banners also has the side effect of hiding OS version information and other detailed system information from attackers attempting to target specific exploits at a system. The /etc/motd , /etc/issue , and /etc/issue.net files govern warning banners for standard command line logins for both local and remote users.

      Guidelines published by the US Department of Defense require that warning messages include at least the name of the organization that owns the system, the fact that the system is subject to monitoring and that such monitoring is in compliance with local statutes, and that use of the system implies consent to such monitoring. It is important that the organization's legal counsel review the content of all messages before any system modifications are made, as these warning messages are inherently site-specific. More information (including citations of relevant case law) can be found at http://www.justice.gov/criminal/cybercrime/

      Note: The text provided in the remediation actions for these items is intended as an example only. Please edit to include the specific text for your organization as approved by your legal department

      Pass

      1.7.1 Ensure message of the day is configured properly

      Description:

      The contents of the /etc/motd file are displayed to users after login and function as a message of the day for authenticated users.

      Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If mingetty(8) supports the following options, they display operating system information: \m - machine architecture \r - operating system release \s - operating system name \v - operating system version

      Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the " uname -a " command once they have logged in.

      Edit the /etc/motd file with the appropriate contents according to your site policy, remove any instances of \m , \r , \s , \v or references to the OS platform . Add or update the message text to follow local site policy.

      Example Text:

      # echo "Authorized use only. All activity may be monitored and reported." > /etc/issue.net

      -- OR --

      If the motd is not used, this file can be removed.

      Run the following command to remove the motd file:

      # rm /etc/motd

      Show Assessment Evidence
      Complex Check
      AND
      Script: sce/wbmotd.sh
      Result: Pass
      Exit Value: 101
      Output:
      • Warning Banner "/etc/motd" passed
      No error lines were collected.


      Show Rule Result XML
      <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                         xmlns:notes="http://benchmarks.cisecurity.org/notes"
                         xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                         xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                         xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                         xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                         xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                         xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                         xmlns="http://checklists.nist.gov/xccdf/1.2"
                         xmlns:xhtml="http://www.w3.org/1999/xhtml"
                         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                         xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                         xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                         xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                         xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                         idref="xccdf_org.cisecurity.benchmarks_rule_1.7.1_Ensure_message_of_the_day_is_configured_properly"
                         role="full"
                         severity="unknown"
                         time="2024-04-14T23:46:23.858-04:00"
                         version="1"
                         weight="1.0">
         <xccdf:result>pass</xccdf:result>
         <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-3</xccdf:ident>
         <xccdf:complex-check operator="AND" negate="false">
            <xccdf:check system="http://open-scap.org/page/SCE"
                         negate="false"
                         multi-check="false">
               <xccdf:check-content-ref href="sce/wbmotd.sh"/>
               <xccdf:check-content>
                  <command_result href="sce/wbmotd.sh"
                                  xccdf="pass"
                                  script="/root/Assessor/sce/wbmotd.sh"
                                  exit-value="101">
                     <out>
                        <l>Warning Banner "/etc/motd" passed</l>
                     </out>
                     <err/>
                     <env/>
                  </command_result>
               </xccdf:check-content>
               <evidence xmlns="http://cisecurity.org/evidence">
                  <div class="sce">
                     <table class="evidence-sep" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Script:</td>
                              <td>sce/wbmotd.sh</td>
                           </tr>
                           <tr>
                              <td class="bold">Result:</td>
                              <td class="pass">Pass</td>
                           </tr>
                           <tr>
                              <td class="bold">Exit Value:</td>
                              <td>101</td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Output:</td>
                              <td>
                                 <ul class="unstyled">
                                    <li>Warning Banner "/etc/motd" passed</li>
                                 </ul>
                              </td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td>No error lines were collected.</td>
                           </tr>
                        </tbody>
                     </table>
                  </div>
               </evidence>
            </xccdf:check>
         </xccdf:complex-check>
      </xccdf:rule-result>
      

      References:

      • URL: NIST SP 800-53 Rev. 5: CM-3

      Fail

      1.7.2 Ensure local login warning banner is configured properly

      Description:

      The contents of the /etc/issue file are displayed to users prior to login for local terminals.

      Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If mingetty(8) supports the following options, they display operating system information: \m - machine architecture \r - operating system release \s - operating system name \v - operating system version - or the operating system's name

      Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the " uname -a " command once they have logged in.

      Edit the /etc/issue file with the appropriate contents according to your site policy, remove any instances of \m , \r , \s , \v or references to the OS platform . Add or update the message text to follow local site policy.

      Example Text:

      # echo "Authorized use only. All activity may be monitored and reported." > /etc/issue.net

      Show Assessment Evidence
      Complex Check
      AND
      Script: sce/wbissue.sh
      Result: Fail
      Exit Value: 102
      Output:
      • Warning Banner contains:
      No error lines were collected.


      Show Rule Result XML
      <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                         xmlns:notes="http://benchmarks.cisecurity.org/notes"
                         xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                         xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                         xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                         xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                         xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                         xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                         xmlns="http://checklists.nist.gov/xccdf/1.2"
                         xmlns:xhtml="http://www.w3.org/1999/xhtml"
                         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                         xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                         xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                         xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                         xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                         idref="xccdf_org.cisecurity.benchmarks_rule_1.7.2_Ensure_local_login_warning_banner_is_configured_properly"
                         role="full"
                         severity="unknown"
                         time="2024-04-14T23:46:23.858-04:00"
                         version="1"
                         weight="1.0">
         <xccdf:result>fail</xccdf:result>
         <xccdf:complex-check operator="AND" negate="false">
            <xccdf:check system="http://open-scap.org/page/SCE"
                         negate="false"
                         multi-check="false">
               <xccdf:check-content-ref href="sce/wbissue.sh"/>
               <xccdf:check-content>
                  <command_result href="sce/wbissue.sh"
                                  xccdf="fail"
                                  script="/root/Assessor/sce/wbissue.sh"
                                  exit-value="102">
                     <out>
                        <l>Warning Banner contains: </l>
                     </out>
                     <err/>
                     <env/>
                  </command_result>
               </xccdf:check-content>
               <evidence xmlns="http://cisecurity.org/evidence">
                  <div class="sce">
                     <table class="evidence-sep" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Script:</td>
                              <td>sce/wbissue.sh</td>
                           </tr>
                           <tr>
                              <td class="bold">Result:</td>
                              <td class="fail">Fail</td>
                           </tr>
                           <tr>
                              <td class="bold">Exit Value:</td>
                              <td>102</td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Output:</td>
                              <td>
                                 <ul class="unstyled">
                                    <li>Warning Banner contains: </li>
                                 </ul>
                              </td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td>No error lines were collected.</td>
                           </tr>
                        </tbody>
                     </table>
                  </div>
               </evidence>
            </xccdf:check>
         </xccdf:complex-check>
      </xccdf:rule-result>
      
      Fail

      1.7.3 Ensure remote login warning banner is configured properly

      Description:

      The contents of the /etc/issue.net file are displayed to users prior to login for remote connections from configured services.

      Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If mingetty(8) supports the following options, they display operating system information: \m - machine architecture \r - operating system release \s - operating system name \v - operating system version

      Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the " uname -a " command once they have logged in.

      Edit the /etc/issue.net file with the appropriate contents according to your site policy, remove any instances of \m , \r , \s , \v or references to the OS platform . Add or update the message text to follow local site policy.

      Example Text:

      # echo "Authorized use only. All activity may be monitored and reported." > /etc/issue.net

      Show Assessment Evidence
      Complex Check
      AND
      Script: sce/wbissue.net.sh
      Result: Fail
      Exit Value: 102
      Output:
      • Warning Banner contains:
      No error lines were collected.


      Show Rule Result XML
      <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                         xmlns:notes="http://benchmarks.cisecurity.org/notes"
                         xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                         xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                         xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                         xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                         xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                         xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                         xmlns="http://checklists.nist.gov/xccdf/1.2"
                         xmlns:xhtml="http://www.w3.org/1999/xhtml"
                         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                         xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                         xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                         xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                         xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                         idref="xccdf_org.cisecurity.benchmarks_rule_1.7.3_Ensure_remote_login_warning_banner_is_configured_properly"
                         role="full"
                         severity="unknown"
                         time="2024-04-14T23:46:23.858-04:00"
                         version="1"
                         weight="1.0">
         <xccdf:result>fail</xccdf:result>
         <xccdf:complex-check operator="AND" negate="false">
            <xccdf:check system="http://open-scap.org/page/SCE"
                         negate="false"
                         multi-check="false">
               <xccdf:check-content-ref href="sce/wbissue.net.sh"/>
               <xccdf:check-content>
                  <command_result href="sce/wbissue.net.sh"
                                  xccdf="fail"
                                  script="/root/Assessor/sce/wbissue.net.sh"
                                  exit-value="102">
                     <out>
                        <l>Warning Banner contains: </l>
                     </out>
                     <err/>
                     <env/>
                  </command_result>
               </xccdf:check-content>
               <evidence xmlns="http://cisecurity.org/evidence">
                  <div class="sce">
                     <table class="evidence-sep" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Script:</td>
                              <td>sce/wbissue.net.sh</td>
                           </tr>
                           <tr>
                              <td class="bold">Result:</td>
                              <td class="fail">Fail</td>
                           </tr>
                           <tr>
                              <td class="bold">Exit Value:</td>
                              <td>102</td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Output:</td>
                              <td>
                                 <ul class="unstyled">
                                    <li>Warning Banner contains: </li>
                                 </ul>
                              </td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td>No error lines were collected.</td>
                           </tr>
                        </tbody>
                     </table>
                  </div>
               </evidence>
            </xccdf:check>
         </xccdf:complex-check>
      </xccdf:rule-result>
      
      Pass

      1.7.4 Ensure permissions on /etc/motd are configured

      Description:

      The contents of the /etc/motd file are displayed to users after login and function as a message of the day for authenticated users.

      If the /etc/motd file does not have the correct ownership it could be modified by unauthorized users with incorrect or misleading information.

      Run the following commands to set permissions on /etc/motd :

      # chown root:root $(readlink -e /etc/motd)

      # chmod u-x,go-wx $(readlink -e /etc/motd)

      -- OR --

      Run the following command to remove the /etc/motd file:

      # rm /etc/motd

      Show Assessment Evidence
      Complex Check
      OR
      Script: sce/nix_symlink_file_perm644_chk.sh
      Result: Fail
      Exit Value: 102
      Output:
      • FAILED!
      No error lines were collected.
      Criterion: Ensure no file named /etc/motd exists and unknown test
      Existence Check: None Exist
      Item Check: All
      Result: Pass
      No matching system items were found.


      Show Rule Result XML
      <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                         xmlns:notes="http://benchmarks.cisecurity.org/notes"
                         xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                         xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                         xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                         xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                         xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                         xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                         xmlns="http://checklists.nist.gov/xccdf/1.2"
                         xmlns:xhtml="http://www.w3.org/1999/xhtml"
                         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                         xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                         xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                         xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                         xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                         idref="xccdf_org.cisecurity.benchmarks_rule_1.7.4_Ensure_permissions_on_etcmotd_are_configured"
                         role="full"
                         severity="unknown"
                         time="2024-04-14T23:46:23.858-04:00"
                         version="1"
                         weight="1.0">
         <xccdf:result>pass</xccdf:result>
         <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                      system="http://cisecurity.org/20-cc/v7.0"/>
         <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                      system="http://cisecurity.org/20-cc/v8.0"/>
         <xccdf:complex-check operator="OR" negate="false">
            <xccdf:check system="http://open-scap.org/page/SCE"
                         negate="false"
                         multi-check="false">
               <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                   value-id="xccdf_org.cisecurity.benchmarks_value_3995096_var"/>
               <xccdf:check-content-ref href="sce/nix_symlink_file_perm644_chk.sh"/>
               <xccdf:check-content>
                  <command_result href="sce/nix_symlink_file_perm644_chk.sh"
                                  xccdf="fail"
                                  script="/root/Assessor/sce/nix_symlink_file_perm644_chk.sh"
                                  exit-value="102">
                     <out>
                        <l>FAILED!</l>
                     </out>
                     <err/>
                     <env/>
                  </command_result>
               </xccdf:check-content>
               <evidence xmlns="http://cisecurity.org/evidence">
                  <div class="sce">
                     <table class="evidence-sep" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Script:</td>
                              <td>sce/nix_symlink_file_perm644_chk.sh</td>
                           </tr>
                           <tr>
                              <td class="bold">Result:</td>
                              <td class="fail">Fail</td>
                           </tr>
                           <tr>
                              <td class="bold">Exit Value:</td>
                              <td>102</td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td class="bold">Output:</td>
                              <td>
                                 <ul class="unstyled">
                                    <li>FAILED!</li>
                                 </ul>
                              </td>
                           </tr>
                        </tbody>
                     </table>
                     <table class="evidence" width="100%">
                        <tbody class="tbe">
                           <tr>
                              <td>No error lines were collected.</td>
                           </tr>
                        </tbody>
                     </table>
                  </div>
               </evidence>
            </xccdf:check>
            <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                         negate="false"
                         multi-check="false">
               <xccdf:check-content-ref href="#OVAL-Results-1"
                                        name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995099"/>
               <evidence xmlns="http://cisecurity.org/evidence">
                  <div class="definition"
                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995099">
                     <div class="criteria">
                        <div class="criterion"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995099"
                             check="all"
                             check_existence="none_exist">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Criterion:</td>
                                    <td>Ensure no file named /etc/motd exists and unknown test</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Existence Check:</td>
                                    <td>None Exist</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Item Check:</td>
                                    <td>All</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="pass">Pass</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tr>
                                 <td>No matching system items were found.</td>
                              </tr>
                           </table>
                        </div>
                     </div>
                  </div>
               </evidence>
            </xccdf:check>
         </xccdf:complex-check>
      </xccdf:rule-result>
      

      References:

        CIS Controls V7.0:

        • Control 14: Controlled Access Based on the Need to Know: -- More
          CIS Control Information
          Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
          Subcontrol: 14.6
          Label: Protect Information through Access Control Lists
          Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
        • >

        CIS Critical Security Controls V8.0:

        • Control 3: Data Protection: -- More
          CIS Control Information
          Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
          Safeguard: 3.3
          Label: Configure Data Access Control Lists
          Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
          Implementation Group: IG-1
          Security Function: Protect
        • >

        Pass

        1.7.5 Ensure permissions on /etc/issue are configured

        Description:

        The contents of the /etc/issue file are displayed to users prior to login for local terminals.

        If the /etc/issue file does not have the correct ownership it could be modified by unauthorized users with incorrect or misleading information.

        Run the following commands to set permissions on /etc/issue :

        # chown root:root $(readlink -e /etc/issue)

        # chmod u-x,go-wx $(readlink -e /etc/issue)

        Show Assessment Evidence
        Complex Check
        AND
        Script: sce/nix_symlink_file_perm644_chk.sh
        Result: Pass
        Exit Value: 101
        Output:
        • PASSED!
        No error lines were collected.


        Show Rule Result XML
        <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                           xmlns:notes="http://benchmarks.cisecurity.org/notes"
                           xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                           xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                           xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                           xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                           xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                           xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                           xmlns="http://checklists.nist.gov/xccdf/1.2"
                           xmlns:xhtml="http://www.w3.org/1999/xhtml"
                           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                           xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                           xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                           xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                           xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                           idref="xccdf_org.cisecurity.benchmarks_rule_1.7.5_Ensure_permissions_on_etcissue_are_configured"
                           role="full"
                           severity="unknown"
                           time="2024-04-14T23:46:23.858-04:00"
                           version="1"
                           weight="1.0">
           <xccdf:result>pass</xccdf:result>
           <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                        system="http://cisecurity.org/20-cc/v7.0"/>
           <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                        system="http://cisecurity.org/20-cc/v8.0"/>
           <xccdf:complex-check operator="AND" negate="false">
              <xccdf:check system="http://open-scap.org/page/SCE"
                           negate="false"
                           multi-check="false">
                 <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                     value-id="xccdf_org.cisecurity.benchmarks_value_3995104_var"/>
                 <xccdf:check-content-ref href="sce/nix_symlink_file_perm644_chk.sh"/>
                 <xccdf:check-content>
                    <command_result href="sce/nix_symlink_file_perm644_chk.sh"
                                    xccdf="pass"
                                    script="/root/Assessor/sce/nix_symlink_file_perm644_chk.sh"
                                    exit-value="101">
                       <out>
                          <l>PASSED!</l>
                       </out>
                       <err/>
                       <env/>
                    </command_result>
                 </xccdf:check-content>
                 <evidence xmlns="http://cisecurity.org/evidence">
                    <div class="sce">
                       <table class="evidence-sep" width="100%">
                          <tbody class="tbe">
                             <tr>
                                <td class="bold">Script:</td>
                                <td>sce/nix_symlink_file_perm644_chk.sh</td>
                             </tr>
                             <tr>
                                <td class="bold">Result:</td>
                                <td class="pass">Pass</td>
                             </tr>
                             <tr>
                                <td class="bold">Exit Value:</td>
                                <td>101</td>
                             </tr>
                          </tbody>
                       </table>
                       <table class="evidence" width="100%">
                          <tbody class="tbe">
                             <tr>
                                <td class="bold">Output:</td>
                                <td>
                                   <ul class="unstyled">
                                      <li>PASSED!</li>
                                   </ul>
                                </td>
                             </tr>
                          </tbody>
                       </table>
                       <table class="evidence" width="100%">
                          <tbody class="tbe">
                             <tr>
                                <td>No error lines were collected.</td>
                             </tr>
                          </tbody>
                       </table>
                    </div>
                 </evidence>
              </xccdf:check>
           </xccdf:complex-check>
        </xccdf:rule-result>
        

        References:

          CIS Controls V7.0:

          • Control 14: Controlled Access Based on the Need to Know: -- More
            CIS Control Information
            Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
            Subcontrol: 14.6
            Label: Protect Information through Access Control Lists
            Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
          • >

          CIS Critical Security Controls V8.0:

          • Control 3: Data Protection: -- More
            CIS Control Information
            Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
            Safeguard: 3.3
            Label: Configure Data Access Control Lists
            Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
            Implementation Group: IG-1
            Security Function: Protect
          • >

          Pass

          1.7.6 Ensure permissions on /etc/issue.net are configured

          Description:

          The contents of the /etc/issue.net file are displayed to users prior to login for remote connections from configured services.

          If the /etc/issue.net file does not have the correct ownership it could be modified by unauthorized users with incorrect or misleading information.

          Run the following commands to set permissions on /etc/issue.net :

          # chown root:root $(readlink -e /etc/issue.net)

          # chmod u-x,go-wx $(readlink -e /etc/issue.net)

          Show Assessment Evidence
          Complex Check
          AND
          Script: sce/nix_symlink_file_perm644_chk.sh
          Result: Pass
          Exit Value: 101
          Output:
          • PASSED!
          No error lines were collected.


          Show Rule Result XML
          <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                             xmlns:notes="http://benchmarks.cisecurity.org/notes"
                             xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                             xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                             xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                             xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                             xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                             xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                             xmlns="http://checklists.nist.gov/xccdf/1.2"
                             xmlns:xhtml="http://www.w3.org/1999/xhtml"
                             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                             xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                             xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                             xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                             xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                             idref="xccdf_org.cisecurity.benchmarks_rule_1.7.6_Ensure_permissions_on_etcissue.net_are_configured"
                             role="full"
                             severity="unknown"
                             time="2024-04-14T23:46:23.858-04:00"
                             version="1"
                             weight="1.0">
             <xccdf:result>pass</xccdf:result>
             <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                          system="http://cisecurity.org/20-cc/v7.0"/>
             <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                          system="http://cisecurity.org/20-cc/v8.0"/>
             <xccdf:complex-check operator="AND" negate="false">
                <xccdf:check system="http://open-scap.org/page/SCE"
                             negate="false"
                             multi-check="false">
                   <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                       value-id="xccdf_org.cisecurity.benchmarks_value_3995109_var"/>
                   <xccdf:check-content-ref href="sce/nix_symlink_file_perm644_chk.sh"/>
                   <xccdf:check-content>
                      <command_result href="sce/nix_symlink_file_perm644_chk.sh"
                                      xccdf="pass"
                                      script="/root/Assessor/sce/nix_symlink_file_perm644_chk.sh"
                                      exit-value="101">
                         <out>
                            <l>PASSED!</l>
                         </out>
                         <err/>
                         <env/>
                      </command_result>
                   </xccdf:check-content>
                   <evidence xmlns="http://cisecurity.org/evidence">
                      <div class="sce">
                         <table class="evidence-sep" width="100%">
                            <tbody class="tbe">
                               <tr>
                                  <td class="bold">Script:</td>
                                  <td>sce/nix_symlink_file_perm644_chk.sh</td>
                               </tr>
                               <tr>
                                  <td class="bold">Result:</td>
                                  <td class="pass">Pass</td>
                               </tr>
                               <tr>
                                  <td class="bold">Exit Value:</td>
                                  <td>101</td>
                               </tr>
                            </tbody>
                         </table>
                         <table class="evidence" width="100%">
                            <tbody class="tbe">
                               <tr>
                                  <td class="bold">Output:</td>
                                  <td>
                                     <ul class="unstyled">
                                        <li>PASSED!</li>
                                     </ul>
                                  </td>
                               </tr>
                            </tbody>
                         </table>
                         <table class="evidence" width="100%">
                            <tbody class="tbe">
                               <tr>
                                  <td>No error lines were collected.</td>
                               </tr>
                            </tbody>
                         </table>
                      </div>
                   </evidence>
                </xccdf:check>
             </xccdf:complex-check>
          </xccdf:rule-result>
          

          References:

            CIS Controls V7.0:

            • Control 14: Controlled Access Based on the Need to Know: -- More
              CIS Control Information
              Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
              Subcontrol: 14.6
              Label: Protect Information through Access Control Lists
              Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
            • >

            CIS Critical Security Controls V8.0:

            • Control 3: Data Protection: -- More
              CIS Control Information
              Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
              Safeguard: 3.3
              Label: Configure Data Access Control Lists
              Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            1.8 GNOME Display Manager

            The GNOME Display Manager (GDM) is a program that manages graphical display servers and handles graphical user logins.

            Note: If GDM is not installed on the system, this section can be skipped

            Pass

            1.8.2 Ensure GDM login banner is configured

            Description:

            GDM is the GNOME Display Manager which handles graphical login for GNOME based systems.

            Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place.

            Run the following script to verify that the banner message is enabled and set:

            #!/usr/bin/env bash



            {

            l_pkgoutput=""

            if command -v dpkg-query > /dev/null 2>&1; then

            l_pq="dpkg-query -W"

            elif command -v rpm > /dev/null 2>&1; then

            l_pq="rpm -q"

            fi

            l_pcl="gdm gdm3" # Space seporated list of packages to check

            for l_pn in $l_pcl; do

            $l_pq "$l_pn" > /dev/null 2>&1 && l_pkgoutput="$l_pkgoutput\n - Package: \"$l_pn\" exists on the system\n - checking configuration"

            done

            if [ -n "$l_pkgoutput" ]; then



            l_gdmprofile="gdm" # Set this to desired profile name IaW Local site policy

            l_bmessage="'Authorized uses only. All activity may be monitored and reported'" # Set to desired banner message

            if [ ! -f "/etc/dconf/profile/$l_gdmprofile" ]; then

            echo "Creating profile \"$l_gdmprofile\""

            echo -e "user-db:user\nsystem-db:$l_gdmprofile\nfile-db:/usr/share/$l_gdmprofile/greeter-dconf-defaults" > /etc/dconf/profile/$l_gdmprofile

            fi

            if [ ! -d "/etc/dconf/db/$l_gdmprofile.d/" ]; then

            echo "Creating dconf database directory \"/etc/dconf/db/$l_gdmprofile.d/\""

            mkdir /etc/dconf/db/$l_gdmprofile.d/

            fi

            if ! grep -Piq '^\h*banner-message-enable\h*=\h*true\b' /etc/dconf/db/$l_gdmprofile.d/*; then

            echo "creating gdm keyfile for machine-wide settings"

            if ! grep -Piq -- '^\h*banner-message-enable\h*=\h*' /etc/dconf/db/$l_gdmprofile.d/*; then

            l_kfile="/etc/dconf/db/$l_gdmprofile.d/01-banner-message"

            echo -e "\n[org/gnome/login-screen]\nbanner-message-enable=true" >> "$l_kfile"

            else

            l_kfile="$(grep -Pil -- '^\h*banner-message-enable\h*=\h*' /etc/dconf/db/$l_gdmprofile.d/*)"

            ! grep -Pq '^\h*\[org\/gnome\/login-screen\]' "$l_kfile" && sed -ri '/^\s*banner-message-enable/ i\[org/gnome/login-screen]' "$l_kfile"

            ! grep -Pq '^\h*banner-message-enable\h*=\h*true\b' "$l_kfile" && sed -ri 's/^\s*(banner-message-enable\s*=\s*)(\S+)(\s*.*$)/\1true \3//' "$l_kfile"

            # sed -ri '/^\s*\[org\/gnome\/login-screen\]/ a\\nbanner-message-enable=true' "$l_kfile"

            fi

            fi

            if ! grep -Piq "^\h*banner-message-text=[\'\"]+\S+" "$l_kfile"; then

            sed -ri "/^\s*banner-message-enable/ a\banner-message-text=$l_bmessage" "$l_kfile"

            fi

            dconf update

            else

            echo -e "\n\n - GNOME Desktop Manager isn't installed\n - Recommendation is Not Applicable\n - No remediation required\n"

            fi

            }

            Note:

            • There is no character limit for the banner message. gnome-shell autodetects longer stretches of text and enters two column mode.

            • The banner message cannot be read from an external file.

              OR

            Run the following command to remove the gdm3 package:

            # apt purge gdm3

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Criterion: Ensure package name equals 'gdm3' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensure package name equals 'gdm' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Script: sce/nix_gdm_login_banner_configured_chk.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - The "banner-message-enable" option isn't configured
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_1.8.2_Ensure_GDM_login_banner_is_configured"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.858-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident system="URL">https://help.gnome.org/admin/system-admin-guide/stable/login-banner.html.en</xccdf:ident>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1,CM-2, CM-6, CM-7, IA-5</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995128"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995128">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995128"
                                      check="all"
                                      check_existence="none_exist">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure package name equals 'gdm3' is not installed</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>None Exist</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995133"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995133">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995133"
                                      check="all"
                                      check_existence="none_exist">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure package name equals 'gdm' is not installed</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>None Exist</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/nix_gdm_login_banner_configured_chk.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/nix_gdm_login_banner_configured_chk.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/nix_gdm_login_banner_configured_chk.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** FAIL **</l>
                              <l> - Reason(s) for audit failure:</l>
                              <l/>
                              <l> - The "banner-message-enable" option isn't configured</l>
                              <l/>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/nix_gdm_login_banner_configured_chk.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** FAIL **</li>
                                          <li> - Reason(s) for audit failure:</li>
                                          <li/>
                                          <li> - The "banner-message-enable" option isn't configured</li>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: https://help.gnome.org/admin/system-admin-guide/stable/login-banner.html.en
            • URL: NIST SP 800-53 Rev. 5: CM-1,CM-2, CM-6, CM-7, IA-5

            Pass

            1.8.3 Ensure GDM disable-user-list option is enabled

            Description:

            GDM is the GNOME Display Manager which handles graphical login for GNOME based systems.

            The disable-user-list option controls if a list of users is displayed on the login screen

            Displaying the user list eliminates half of the Userid/Password equation that an unauthorized person would need to log on.

            Run the following script to enable the disable-user-list option:

            Note: the l_gdm_profile variable in the script can be changed if a different profile name is desired in accordance with local site policy.

            #!/usr/bin/env bash



            {

            l_gdmprofile="gdm"

            if [ ! -f "/etc/dconf/profile/$l_gdmprofile" ]; then

            echo "Creating profile \"$l_gdmprofile\""

            echo -e "user-db:user\nsystem-db:$l_gdmprofile\nfile-db:/usr/share/$l_gdmprofile/greeter-dconf-defaults" > /etc/dconf/profile/$l_gdmprofile

            fi

            if [ ! -d "/etc/dconf/db/$l_gdmprofile.d/" ]; then

            echo "Creating dconf database directory \"/etc/dconf/db/$l_gdmprofile.d/\""

            mkdir /etc/dconf/db/$l_gdmprofile.d/

            fi

            if ! grep -Piq '^\h*disable-user-list\h*=\h*true\b' /etc/dconf/db/$l_gdmprofile.d/*; then

            echo "creating gdm keyfile for machine-wide settings"

            if ! grep -Piq -- '^\h*\[org\/gnome\/login-screen\]' /etc/dconf/db/$l_gdmprofile.d/*; then

            echo -e "\n[org/gnome/login-screen]\n# Do not show the user list\ndisable-user-list=true" >> /etc/dconf/db/$l_gdmprofile.d/00-login-screen

            else

            sed -ri '/^\s*\[org\/gnome\/login-screen\]/ a\# Do not show the user list\ndisable-user-list=true' $(grep -Pil -- '^\h*\[org\/gnome\/login-screen\]' /etc/dconf/db/$l_gdmprofile.d/*)

            fi

            fi

            dconf update

            }

            Note: When the user profile is created or changed, the user will need to log out and log in again before the changes will be applied.

            OR

            Run the following command to remove the GNOME package:

            # apt purge gdm3

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Criterion: Ensure package name equals 'gdm3' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensure package name equals 'gdm' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Script: sce/nix_gdm_disable_user_list_chk.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • *** FAIL: ***
            • - The "disable-user-list" option is not enabled
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_1.8.3_Ensure_GDM_disable-user-list_option_is_enabled"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.858-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident system="URL">https://help.gnome.org/admin/system-admin-guide/stable/login-userlist-disable.html.en</xccdf:ident>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1,CM-2, CM-6, CM-7, IA-5</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995142"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995142">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995142"
                                      check="all"
                                      check_existence="none_exist">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure package name equals 'gdm3' is not installed</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>None Exist</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995147"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995147">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995147"
                                      check="all"
                                      check_existence="none_exist">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure package name equals 'gdm' is not installed</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>None Exist</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/nix_gdm_disable_user_list_chk.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/nix_gdm_disable_user_list_chk.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/nix_gdm_disable_user_list_chk.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>   *** FAIL: ***</l>
                              <l/>
                              <l> - The "disable-user-list" option is not enabled</l>
                              <l/>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/nix_gdm_disable_user_list_chk.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>   *** FAIL: ***</li>
                                          <li/>
                                          <li> - The "disable-user-list" option is not enabled</li>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: https://help.gnome.org/admin/system-admin-guide/stable/login-userlist-disable.html.en
            • URL: NIST SP 800-53 Rev. 5: CM-1,CM-2, CM-6, CM-7, IA-5

            Pass

            1.8.4 Ensure GDM screen locks when the user is idle

            Description:

            GNOME Desktop Manager can make the screen lock automatically whenever the user is idle for some amount of time.

            • idle-delay=uint32 {n} - Number of seconds of inactivity before the screen goes blank
            • lock-delay=uint32 {n} - Number of seconds after the screen is blank before locking the screen

            Example key file:

            # Specify the dconf path

            [org/gnome/desktop/session]



            # Number of seconds of inactivity before the screen goes blank

            # Set to 0 seconds if you want to deactivate the screensaver.

            idle-delay=uint32 900



            # Specify the dconf path

            [org/gnome/desktop/screensaver]



            # Number of seconds after the screen is blank before locking the screen

            lock-delay=uint32 5

            Setting a lock-out value reduces the window of opportunity for unauthorized user access to another user's session that has been left unattended.

            Create or edit a file in the /etc/dconf/profile/ and verify it includes the following:

            user-db:user

            system-db:{NAME_OF_DCONF_DATABASE}

            Note:local is the name of a dconf database used in the examples.

            Example:

            # echo -e '\nuser-db:user\nsystem-db:local' >> /etc/dconf/profile/user

            Create the directory /etc/dconf/db/{NAME_OF_DCONF_DATABASE}.d/ if it doesn't already exist:

            Example:

            # mkdir /etc/dconf/db/local.d

            Create the key file `/etc/dconf/db/{NAME_OF_DCONF_DATABASE}.d/{FILE_NAME} to provide information for the {NAME_OF_DCONF_DATABASE} database:

            Example script:

            #!/usr/bin/env bash



            {

            l_key_file="/etc/dconf/db/local.d/00-screensaver"

            l_idmv="900" # Set max value for idle-delay in seconds (between 1 and 900)

            l_ldmv="5" # Set max value for lock-delay in seconds (between 0 and 5)

            {

            echo '# Specify the dconf path'

            echo '[org/gnome/desktop/session]'

            echo ''

            echo '# Number of seconds of inactivity before the screen goes blank'

            echo '# Set to 0 seconds if you want to deactivate the screensaver.'

            echo "idle-delay=uint32 $l_idmv"

            echo ''

            echo '# Specify the dconf path'

            echo '[org/gnome/desktop/screensaver]'

            echo ''

            echo '# Number of seconds after the screen is blank before locking the screen'

            echo "lock-delay=uint32 $l_ldmv"

            } > "$l_key_file"

            }

            Note: You must include the uint32 along with the integer key values as shown.

            Run the following command to update the system databases:

            # dconf update

            Note: Users must log out and back in again before the system-wide settings take effect.

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Criterion: Ensure package name equals 'gdm3' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensure package name equals 'gdm' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Script: sce/nix_gdm_screen_lock_chk.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - The "idle-delay" option doesn't exist, remaining tests skipped
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_1.8.4_Ensure_GDM_screen_locks_when_the_user_is_idle"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.858-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/3"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/16/subcontrol/11"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident system="URL">https://help.gnome.org/admin/system-admin-guide/stable/desktop-lockscreen.html.en</xccdf:ident>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1,CM-2, CM-6, CM-7, IA-5</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995158"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995158">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995158"
                                      check="all"
                                      check_existence="none_exist">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure package name equals 'gdm3' is not installed</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>None Exist</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995161"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995161">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995161"
                                      check="all"
                                      check_existence="none_exist">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure package name equals 'gdm' is not installed</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>None Exist</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                         value-id="xccdf_org.cisecurity.benchmarks_value_3995154_var"/>
                     <xccdf:check-content-ref href="sce/nix_gdm_screen_lock_chk.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/nix_gdm_screen_lock_chk.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/nix_gdm_screen_lock_chk.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** FAIL **</l>
                              <l> - Reason(s) for audit failure:</l>
                              <l/>
                              <l> - The "idle-delay" option doesn't exist, remaining tests skipped</l>
                              <l/>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/nix_gdm_screen_lock_chk.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** FAIL **</li>
                                          <li> - Reason(s) for audit failure:</li>
                                          <li/>
                                          <li> - The "idle-delay" option doesn't exist, remaining tests skipped</li>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: https://help.gnome.org/admin/system-admin-guide/stable/desktop-lockscreen.html.en
            • URL: NIST SP 800-53 Rev. 5: CM-1,CM-2, CM-6, CM-7, IA-5

            CIS Controls V7.0:

            • Control 16: Account Monitoring and Control: -- More
              CIS Control Information
              Control: Actively manage the life cycle of system and application accounts - their creation, use, dormancy, deletion - in order to minimize opportunities for attackers to leverage them.
              Subcontrol: 16.11
              Label: Lock Workstation Sessions After Inactivity
              Description: Automatically lock workstation sessions after a standard period of inactivity.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.3
              Label: Configure Automatic Session Locking on Enterprise Assets
              Description: Configure automatic session locking on enterprise assets after a defined period of inactivity. For general purpose operating systems, the period must not exceed 15 minutes. For mobile end-user devices, the period must not exceed 2 minutes.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Pass

            1.8.5 Ensure GDM screen locks cannot be overridden

            Description:

            GNOME Desktop Manager can make the screen lock automatically whenever the user is idle for some amount of time.

            By using the lockdown mode in dconf, you can prevent users from changing specific settings.

            To lock down a dconf key or subpath, create a locks subdirectory in the keyfile directory. The files inside this directory contain a list of keys or subpaths to lock. Just as with the keyfiles, you may add any number of files to this directory.

            Example Lock File:

            # Lock desktop screensaver settings

            /org/gnome/desktop/session/idle-delay

            /org/gnome/desktop/screensaver/lock-delay

            Setting a lock-out value reduces the window of opportunity for unauthorized user access to another user's session that has been left unattended.

            Without locking down the system settings, user settings take precedence over the system settings.

            Run the following script to ensure screen locks can not be overridden:

            #!/usr/bin/env bash



            {

            # Check if GNMOE Desktop Manager is installed. If package isn't installed, recommendation is Not Applicable\n

            # determine system's package manager

            l_pkgoutput=""

            if command -v dpkg-query > /dev/null 2>&1; then

            l_pq="dpkg-query -W"

            elif command -v rpm > /dev/null 2>&1; then

            l_pq="rpm -q"

            fi

            # Check if GDM is installed

            l_pcl="gdm gdm3" # Space seporated list of packages to check

            for l_pn in $l_pcl; do

            $l_pq "$l_pn" > /dev/null 2>&1 && l_pkgoutput="y" && echo -e "\n - Package: \"$l_pn\" exists on the system\n - remediating configuration if needed"

            done

            # Check configuration (If applicable)

            if [ -n "$l_pkgoutput" ]; then

            # Look for idle-delay to determine profile in use, needed for remaining tests

            l_kfd="/etc/dconf/db/$(grep -Psril '^\h*idle-delay\h*=\h*uint32\h+\d+\b' /etc/dconf/db/*/ | awk -F'/' '{split($(NF-1),a,".");print a[1]}').d" #set directory of key file to be locked

            # Look for lock-delay to determine profile in use, needed for remaining tests

            l_kfd2="/etc/dconf/db/$(grep -Psril '^\h*lock-delay\h*=\h*uint32\h+\d+\b' /etc/dconf/db/*/ | awk -F'/' '{split($(NF-1),a,".");print a[1]}').d" #set directory of key file to be locked

            if [ -d "$l_kfd" ]; then # If key file directory doesn't exist, options can't be locked

            if grep -Prilq '^\h*\/org\/gnome\/desktop\/session\/idle-delay\b' "$l_kfd"; then

            echo " - \"idle-delay\" is locked in \"$(grep -Pril '^\h*\/org\/gnome\/desktop\/session\/idle-delay\b' "$l_kfd")\""

            else

            echo "creating entry to lock \"idle-delay\""

            [ ! -d "$l_kfd"/locks ] && echo "creating directory $l_kfd/locks" && mkdir "$l_kfd"/locks

            {

            echo -e '\n# Lock desktop screensaver idle-delay setting'

            echo '/org/gnome/desktop/session/idle-delay'

            } >> "$l_kfd"/locks/00-screensaver

            fi

            else

            echo -e " - \"idle-delay\" is not set so it can not be locked\n - Please follow Recommendation \"Ensure GDM screen locks when the user is idle\" and follow this Recommendation again"

            fi

            if [ -d "$l_kfd2" ]; then # If key file directory doesn't exist, options can't be locked

            if grep -Prilq '^\h*\/org\/gnome\/desktop\/screensaver\/lock-delay\b' "$l_kfd2"; then

            echo " - \"lock-delay\" is locked in \"$(grep -Pril '^\h*\/org\/gnome\/desktop\/screensaver\/lock-delay\b' "$l_kfd2")\""

            else

            echo "creating entry to lock \"lock-delay\""

            [ ! -d "$l_kfd2"/locks ] && echo "creating directory $l_kfd2/locks" && mkdir "$l_kfd2"/locks

            {

            echo -e '\n# Lock desktop screensaver lock-delay setting'

            echo '/org/gnome/desktop/screensaver/lock-delay'

            } >> "$l_kfd2"/locks/00-screensaver

            fi

            else

            echo -e " - \"lock-delay\" is not set so it can not be locked\n - Please follow Recommendation \"Ensure GDM screen locks when the user is idle\" and follow this Recommendation again"

            fi

            else

            echo -e " - GNOME Desktop Manager package is not installed on the system\n - Recommendation is not applicable"

            fi

            }

            Run the following command to update the system databases:

            # dconf update

            Note: Users must log out and back in again before the system-wide settings take effect.

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Criterion: Ensure package name equals 'gdm3' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensure package name equals 'gdm' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Script: sce/nix_gdm_screen_lock_override_chk.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - "idle-delay" is not set so it can not be locked
            • - "lock-delay" is not set so it can not be locked
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_1.8.5_Ensure_GDM_screen_locks_cannot_be_overridden"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.859-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/3"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/16/subcontrol/11"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident system="URL">https://help.gnome.org/admin/system-admin-guide/stable/desktop-lockscreen.html.en</xccdf:ident>
               <xccdf:ident system="URL">https://help.gnome.org/admin/system-admin-guide/stable/dconf-lockdown.html.en</xccdf:ident>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-11</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:4043350"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:4043350">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:4043350"
                                      check="all"
                                      check_existence="none_exist">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure package name equals 'gdm3' is not installed</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>None Exist</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:4043351"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:4043351">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:4043351"
                                      check="all"
                                      check_existence="none_exist">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure package name equals 'gdm' is not installed</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>None Exist</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/nix_gdm_screen_lock_override_chk.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/nix_gdm_screen_lock_override_chk.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/nix_gdm_screen_lock_override_chk.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** FAIL **</l>
                              <l> - Reason(s) for audit failure:</l>
                              <l/>
                              <l> - "idle-delay" is not set so it can not be locked</l>
                              <l> - "lock-delay" is not set so it can not be locked</l>
                              <l/>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/nix_gdm_screen_lock_override_chk.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** FAIL **</li>
                                          <li> - Reason(s) for audit failure:</li>
                                          <li/>
                                          <li> - "idle-delay" is not set so it can not be locked</li>
                                          <li> - "lock-delay" is not set so it can not be locked</li>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: https://help.gnome.org/admin/system-admin-guide/stable/desktop-lockscreen.html.en
            • URL: https://help.gnome.org/admin/system-admin-guide/stable/dconf-lockdown.html.en
            • URL: NIST SP 800-53 Rev. 5: CM-11

            CIS Controls V7.0:

            • Control 16: Account Monitoring and Control: -- More
              CIS Control Information
              Control: Actively manage the life cycle of system and application accounts - their creation, use, dormancy, deletion - in order to minimize opportunities for attackers to leverage them.
              Subcontrol: 16.11
              Label: Lock Workstation Sessions After Inactivity
              Description: Automatically lock workstation sessions after a standard period of inactivity.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.3
              Label: Configure Automatic Session Locking on Enterprise Assets
              Description: Configure automatic session locking on enterprise assets after a defined period of inactivity. For general purpose operating systems, the period must not exceed 15 minutes. For mobile end-user devices, the period must not exceed 2 minutes.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Pass

            1.8.6 Ensure GDM automatic mounting of removable media is disabled

            Description:

            By default GNOME automatically mounts removable media when inserted as a convenience to the user.

            With automounting enabled anyone with physical access could attach a USB drive or disc and have its contents available in system even if they lacked permissions to mount it themselves.

            Run the following script to disable automatic mounting of media for all GNOME users:

            #!/usr/bin/env bash



            {

            l_pkgoutput="" l_output="" l_output2=""

            l_gpname="local" # Set to desired dconf profile name (defaule is local)

            # Check if GNOME Desktop Manager is installed. If package isn't installed, recommendation is Not Applicable\n

            # determine system's package manager

            if command -v dpkg-query > /dev/null 2>&1; then

            l_pq="dpkg-query -W"

            elif command -v rpm > /dev/null 2>&1; then

            l_pq="rpm -q"

            fi

            # Check if GDM is installed

            l_pcl="gdm gdm3" # Space seporated list of packages to check

            for l_pn in $l_pcl; do

            $l_pq "$l_pn" > /dev/null 2>&1 && l_pkgoutput="$l_pkgoutput\n - Package: \"$l_pn\" exists on the system\n - checking configuration"

            done

            echo -e "$l_packageout"

            # Check configuration (If applicable)

            if [ -n "$l_pkgoutput" ]; then

            echo -e "$l_pkgoutput"

            # Look for existing settings and set variables if they exist

            l_kfile="$(grep -Prils -- '^\h*automount\b' /etc/dconf/db/*.d)"

            l_kfile2="$(grep -Prils -- '^\h*automount-open\b' /etc/dconf/db/*.d)"

            # Set profile name based on dconf db directory ({PROFILE_NAME}.d)

            if [ -f "$l_kfile" ]; then

            l_gpname="$(awk -F\/ '{split($(NF-1),a,".");print a[1]}' <<< "$l_kfile")"

            echo " - updating dconf profile name to \"$l_gpname\""

            elif [ -f "$l_kfile2" ]; then

            l_gpname="$(awk -F\/ '{split($(NF-1),a,".");print a[1]}' <<< "$l_kfile2")"

            echo " - updating dconf profile name to \"$l_gpname\""

            fi

            # check for consistency (Clean up configuration if needed)

            if [ -f "$l_kfile" ] && [ "$(awk -F\/ '{split($(NF-1),a,".");print a[1]}' <<< "$l_kfile")" != "$l_gpname" ]; then

            sed -ri "/^\s*automount\s*=/s/^/# /" "$l_kfile"

            l_kfile="/etc/dconf/db/$l_gpname.d/00-media-automount"

            fi

            if [ -f "$l_kfile2" ] && [ "$(awk -F\/ '{split($(NF-1),a,".");print a[1]}' <<< "$l_kfile2")" != "$l_gpname" ]; then

            sed -ri "/^\s*automount-open\s*=/s/^/# /" "$l_kfile2"

            fi

            [ -z "$l_kfile" ] && l_kfile="/etc/dconf/db/$l_gpname.d/00-media-automount"

            # Check if profile file exists

            if grep -Pq -- "^\h*system-db:$l_gpname\b" /etc/dconf/profile/*; then

            echo -e "\n - dconf database profile exists in: \"$(grep -Pl -- "^\h*system-db:$l_gpname\b" /etc/dconf/profile/*)\""

            else

            [ ! -f "/etc/dconf/profile/user" ] && l_gpfile="/etc/dconf/profile/user" || l_gpfile="/etc/dconf/profile/user2"

            echo -e " - creating dconf database profile"

            {

            echo -e "\nuser-db:user"

            echo "system-db:$l_gpname"

            } >> "$l_gpfile"

            fi

            # create dconf directory if it doesn't exists

            l_gpdir="/etc/dconf/db/$l_gpname.d"

            if [ -d "$l_gpdir" ]; then

            echo " - The dconf database directory \"$l_gpdir\" exists"

            else

            echo " - creating dconf database directory \"$l_gpdir\""

            mkdir "$l_gpdir"

            fi

            # check automount-open setting

            if grep -Pqs -- '^\h*automount-open\h*=\h*false\b' "$l_kfile"; then

            echo " - \"automount-open\" is set to false in: \"$l_kfile\""

            else

            echo " - creating \"automount-open\" entry in \"$l_kfile\""

            ! grep -Psq -- '\^\h*\[org\/gnome\/desktop\/media-handling\]\b' "$l_kfile" && echo '[org/gnome/desktop/media-handling]' >> "$l_kfile"

            sed -ri '/^\s*\[org\/gnome\/desktop\/media-handling\]/a \\nautomount-open=false' "$l_kfile"

            fi

            # check automount setting

            if grep -Pqs -- '^\h*automount\h*=\h*false\b' "$l_kfile"; then

            echo " - \"automount\" is set to false in: \"$l_kfile\""

            else

            echo " - creating \"automount\" entry in \"$l_kfile\""

            ! grep -Psq -- '\^\h*\[org\/gnome\/desktop\/media-handling\]\b' "$l_kfile" && echo '[org/gnome/desktop/media-handling]' >> "$l_kfile"

            sed -ri '/^\s*\[org\/gnome\/desktop\/media-handling\]/a \\nautomount=false' "$l_kfile"

            fi

            else

            echo -e "\n - GNOME Desktop Manager package is not installed on the system\n - Recommendation is not applicable"

            fi

            # update dconf database

            dconf update

            }

            OR

            Run the following command to uninstall the GNOME desktop Manager package:

            # apt purge gdm3

            Impact:

            The use of portable hard drives is very common for workstation users. If your organization allows the use of portable storage or media on workstations and physical access controls to workstations is considered adequate there is little value add in turning off automounting.

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Criterion: Ensure package name equals 'gdm3' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensure package name equals 'gdm' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Script: sce/nix_gdm_automount_chk.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - neither "automount" or "automount-open" is set
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_1.8.6_Ensure_GDM_automatic_mounting_of_removable_media_is_disabled"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.859-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/8/subcontrol/5"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/10/subcontrol/3"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">https://access.redhat.com/solutions/20107</xccdf:ident>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1,CM-2, CM-6, CM-7, IA-5</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995186"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995186">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995186"
                                      check="all"
                                      check_existence="none_exist">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure package name equals 'gdm3' is not installed</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>None Exist</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995190"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995190">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995190"
                                      check="all"
                                      check_existence="none_exist">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure package name equals 'gdm' is not installed</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>None Exist</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/nix_gdm_automount_chk.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/nix_gdm_automount_chk.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/nix_gdm_automount_chk.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** FAIL **</l>
                              <l> - Reason(s) for audit failure:</l>
                              <l/>
                              <l> - neither "automount" or "automount-open" is set</l>
                              <l/>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/nix_gdm_automount_chk.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** FAIL **</li>
                                          <li> - Reason(s) for audit failure:</li>
                                          <li/>
                                          <li> - neither "automount" or "automount-open" is set</li>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: https://access.redhat.com/solutions/20107
            • URL: NIST SP 800-53 Rev. 5: CM-1,CM-2, CM-6, CM-7, IA-5

            CIS Controls V7.0:

            • Control 8: Malware Defenses: -- More
              CIS Control Information
              Control: Control the installation, spread, and execution of malicious code at multiple points in the enterprise, while optimizing the use of automation to enable rapid updating of defense, data gathering, and corrective action.
              Subcontrol: 8.5
              Label: Configure Devices Not To Auto-Run Content
              Description: Configure devices to not auto-run content from removable media.
            • >

            CIS Critical Security Controls V8.0:

            • Control 10: Malware Defenses: -- More
              CIS Control Information
              Control: Prevent or control the installation, spread, and execution of malicious applications, code, or scripts on enterprise assets.
              Safeguard: 10.3
              Label: Disable Autorun and Autoplay for Removable Media
              Description: Disable autorun and autoplay auto-execute functionality for removable media.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Pass

            1.8.7 Ensure GDM disabling automatic mounting of removable media is not overridden

            Description:

            By default GNOME automatically mounts removable media when inserted as a convenience to the user

            By using the lockdown mode in dconf, you can prevent users from changing specific settings.

            To lock down a dconf key or subpath, create a locks subdirectory in the keyfile directory. The files inside this directory contain a list of keys or subpaths to lock. Just as with the keyfiles, you may add any number of files to this directory.

            Example Lock File:

            # Lock desktop screensaver settings

            /org/gnome/desktop/media-handling/automount

            /org/gnome/desktop/media-handling/automount-open

            With automounting enabled anyone with physical access could attach a USB drive or disc and have its contents available in system even if they lacked permissions to mount it themselves.

            Run the following script to lock disable automatic mounting of media for all GNOME users:

            #!/usr/bin/env bash



            {

            # Check if GNMOE Desktop Manager is installed. If package isn't installed, recommendation is Not Applicable\n

            # determine system's package manager

            l_pkgoutput=""

            if command -v dpkg-query > /dev/null 2>&1; then

            l_pq="dpkg-query -W"

            elif command -v rpm > /dev/null 2>&1; then

            l_pq="rpm -q"

            fi

            # Check if GDM is installed

            l_pcl="gdm gdm3" # Space seporated list of packages to check

            for l_pn in $l_pcl; do

            $l_pq "$l_pn" > /dev/null 2>&1 && l_pkgoutput="y" && echo -e "\n - Package: \"$l_pn\" exists on the system\n - remediating configuration if needed"

            done

            # Check configuration (If applicable)

            if [ -n "$l_pkgoutput" ]; then

            # Look for automount to determine profile in use, needed for remaining tests

            l_kfd="/etc/dconf/db/$(grep -Psril '^\h*automount\b' /etc/dconf/db/*/ | awk -F'/' '{split($(NF-1),a,".");print a[1]}').d" #set directory of key file to be locked

            # Look for automount-open to determine profile in use, needed for remaining tests

            l_kfd2="/etc/dconf/db/$(grep -Psril '^\h*automount-open\b' /etc/dconf/db/*/ | awk -F'/' '{split($(NF-1),a,".");print a[1]}').d" #set directory of key file to be locked

            if [ -d "$l_kfd" ]; then # If key file directory doesn't exist, options can't be locked

            if grep -Priq '^\h*\/org/gnome\/desktop\/media-handling\/automount\b' "$l_kfd"; then

            echo " - \"automount\" is locked in \"$(grep -Pril '^\h*\/org/gnome\/desktop\/media-handling\/automount\b' "$l_kfd")\""

            else

            echo " - creating entry to lock \"automount\""

            [ ! -d "$l_kfd"/locks ] && echo "creating directory $l_kfd/locks" && mkdir "$l_kfd"/locks

            {

            echo -e '\n# Lock desktop media-handling automount setting'

            echo '/org/gnome/desktop/media-handling/automount'

            } >> "$l_kfd"/locks/00-media-automount

            fi

            else

            echo -e " - \"automount\" is not set so it can not be locked\n - Please follow Recommendation \"Ensure GDM automatic mounting of removable media is disabled\" and follow this Recommendation again"

            fi

            if [ -d "$l_kfd2" ]; then # If key file directory doesn't exist, options can't be locked

            if grep -Priq '^\h*\/org/gnome\/desktop\/media-handling\/automount-open\b' "$l_kfd2"; then

            echo " - \"automount-open\" is locked in \"$(grep -Pril '^\h*\/org/gnome\/desktop\/media-handling\/automount-open\b' "$l_kfd2")\""

            else

            echo " - creating entry to lock \"automount-open\""

            [ ! -d "$l_kfd2"/locks ] && echo "creating directory $l_kfd2/locks" && mkdir "$l_kfd2"/locks

            {

            echo -e '\n# Lock desktop media-handling automount-open setting'

            echo '/org/gnome/desktop/media-handling/automount-open'

            } >> "$l_kfd2"/locks/00-media-automount

            fi

            else

            echo -e " - \"automount-open\" is not set so it can not be locked\n - Please follow Recommendation \"Ensure GDM automatic mounting of removable media is disabled\" and follow this Recommendation again"

            fi

            # update dconf database

            dconf update

            else

            echo -e " - GNOME Desktop Manager package is not installed on the system\n - Recommendation is not applicable"

            fi

            }

            Impact:

            The use of portable hard drives is very common for workstation users

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Criterion: Ensure package name equals 'gdm3' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensure package name equals 'gdm' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Script: sce/nix_gdm_automount_locked_chk.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - neither "automount" or "automount-open" is set
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_1.8.7_Ensure_GDM_disabling_automatic_mounting_of_removable_media_is_not_overridden"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.859-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident system="URL">https://help.gnome.org/admin/system-admin-guide/stable/dconf-lockdown.html.en</xccdf:ident>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1,CM-2, CM-6, CM-7, IA-5</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995197"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995197">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995197"
                                      check="all"
                                      check_existence="none_exist">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure package name equals 'gdm3' is not installed</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>None Exist</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995199"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995199">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995199"
                                      check="all"
                                      check_existence="none_exist">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure package name equals 'gdm' is not installed</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>None Exist</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/nix_gdm_automount_locked_chk.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/nix_gdm_automount_locked_chk.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/nix_gdm_automount_locked_chk.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** FAIL **</l>
                              <l> - Reason(s) for audit failure:</l>
                              <l/>
                              <l> - neither "automount" or "automount-open" is set</l>
                              <l/>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/nix_gdm_automount_locked_chk.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** FAIL **</li>
                                          <li> - Reason(s) for audit failure:</li>
                                          <li/>
                                          <li> - neither "automount" or "automount-open" is set</li>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: https://help.gnome.org/admin/system-admin-guide/stable/dconf-lockdown.html.en
            • URL: NIST SP 800-53 Rev. 5: CM-1,CM-2, CM-6, CM-7, IA-5

            Pass

            1.8.8 Ensure GDM autorun-never is enabled

            Description:

            The autorun-never setting allows the GNOME Desktop Display Manager to disable autorun through GDM.

            Malware on removable media may taking advantage of Autorun features when the media is inserted into a system and execute.

            Run the following script to set autorun-never to true for GDM users:

            #!/usr/bin/env bash



            {

            l_pkgoutput="" l_output="" l_output2=""

            l_gpname="local" # Set to desired dconf profile name (default is local)

            # Check if GNOME Desktop Manager is installed. If package isn't installed, recommendation is Not Applicable\n

            # determine system's package manager

            if command -v dpkg-query > /dev/null 2>&1; then

            l_pq="dpkg-query -W"

            elif command -v rpm > /dev/null 2>&1; then

            l_pq="rpm -q"

            fi

            # Check if GDM is installed

            l_pcl="gdm gdm3" # Space separated list of packages to check

            for l_pn in $l_pcl; do

            $l_pq "$l_pn" > /dev/null 2>&1 && l_pkgoutput="$l_pkgoutput\n - Package: \"$l_pn\" exists on the system\n - checking configuration"

            done

            echo -e "$l_pkgoutput"

            # Check configuration (If applicable)

            if [ -n "$l_pkgoutput" ]; then

            echo -e "$l_pkgoutput"

            # Look for existing settings and set variables if they exist

            l_kfile="$(grep -Prils -- '^\h*autorun-never\b' /etc/dconf/db/*.d)"

            # Set profile name based on dconf db directory ({PROFILE_NAME}.d)

            if [ -f "$l_kfile" ]; then

            l_gpname="$(awk -F\/ '{split($(NF-1),a,".");print a[1]}' <<< "$l_kfile")"

            echo " - updating dconf profile name to \"$l_gpname\""

            fi

            [ ! -f "$l_kfile" ] && l_kfile="/etc/dconf/db/$l_gpname.d/00-media-autorun"

            # Check if profile file exists

            if grep -Pq -- "^\h*system-db:$l_gpname\b" /etc/dconf/profile/*; then

            echo -e "\n - dconf database profile exists in: \"$(grep -Pl -- "^\h*system-db:$l_gpname\b" /etc/dconf/profile/*)\""

            else

            [ ! -f "/etc/dconf/profile/user" ] && l_gpfile="/etc/dconf/profile/user" || l_gpfile="/etc/dconf/profile/user2"

            echo -e " - creating dconf database profile"

            {

            echo -e "\nuser-db:user"

            echo "system-db:$l_gpname"

            } >> "$l_gpfile"

            fi

            # create dconf directory if it doesn't exists

            l_gpdir="/etc/dconf/db/$l_gpname.d"

            if [ -d "$l_gpdir" ]; then

            echo " - The dconf database directory \"$l_gpdir\" exists"

            else

            echo " - creating dconf database directory \"$l_gpdir\""

            mkdir "$l_gpdir"

            fi

            # check autorun-never setting

            if grep -Pqs -- '^\h*autorun-never\h*=\h*true\b' "$l_kfile"; then

            echo " - \"autorun-never\" is set to true in: \"$l_kfile\""

            else

            echo " - creating or updating \"autorun-never\" entry in \"$l_kfile\""

            if grep -Psq -- '^\h*autorun-never' "$l_kfile"; then

            sed -ri 's/(^\s*autorun-never\s*=\s*)(\S+)(\s*.*)$/\1true \3/' "$l_kfile"

            else

            ! grep -Psq -- '\^\h*\[org\/gnome\/desktop\/media-handling\]\b' "$l_kfile" && echo '[org/gnome/desktop/media-handling]' >> "$l_kfile"

            sed -ri '/^\s*\[org\/gnome\/desktop\/media-handling\]/a \\nautorun-never=true' "$l_kfile"

            fi

            fi

            else

            echo -e "\n - GNOME Desktop Manager package is not installed on the system\n - Recommendation is not applicable"

            fi

            # update dconf database

            dconf update

            }

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Criterion: Ensure package name equals 'gdm3' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensure package name equals 'gdm' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Script: sce/nix_gdm_autorun_never_chk.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - "autorun-never" is not set
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_1.8.8_Ensure_GDM_autorun-never_is_enabled"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.859-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/10/subcontrol/3"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/8/subcontrol/5"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1,CM-2, CM-6, CM-7, IA-5</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995207"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995207">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995207"
                                      check="all"
                                      check_existence="none_exist">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure package name equals 'gdm3' is not installed</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>None Exist</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995211"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995211">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995211"
                                      check="all"
                                      check_existence="none_exist">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure package name equals 'gdm' is not installed</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>None Exist</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/nix_gdm_autorun_never_chk.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/nix_gdm_autorun_never_chk.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/nix_gdm_autorun_never_chk.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** FAIL **</l>
                              <l> - Reason(s) for audit failure:</l>
                              <l/>
                              <l> - "autorun-never" is not set</l>
                              <l/>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/nix_gdm_autorun_never_chk.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** FAIL **</li>
                                          <li> - Reason(s) for audit failure:</li>
                                          <li/>
                                          <li> - "autorun-never" is not set</li>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-1,CM-2, CM-6, CM-7, IA-5

            CIS Controls V7.0:

            • Control 8: Malware Defenses: -- More
              CIS Control Information
              Control: Control the installation, spread, and execution of malicious code at multiple points in the enterprise, while optimizing the use of automation to enable rapid updating of defense, data gathering, and corrective action.
              Subcontrol: 8.5
              Label: Configure Devices Not To Auto-Run Content
              Description: Configure devices to not auto-run content from removable media.
            • >

            CIS Critical Security Controls V8.0:

            • Control 10: Malware Defenses: -- More
              CIS Control Information
              Control: Prevent or control the installation, spread, and execution of malicious applications, code, or scripts on enterprise assets.
              Safeguard: 10.3
              Label: Disable Autorun and Autoplay for Removable Media
              Description: Disable autorun and autoplay auto-execute functionality for removable media.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Pass

            1.8.9 Ensure GDM autorun-never is not overridden

            Description:

            The autorun-never setting allows the GNOME Desktop Display Manager to disable autorun through GDM.

            By using the lockdown mode in dconf, you can prevent users from changing specific settings.

            To lock down a dconf key or subpath, create a locks subdirectory in the keyfile directory. The files inside this directory contain a list of keys or subpaths to lock. Just as with the keyfiles, you may add any number of files to this directory.

            Example Lock File:

            # Lock desktop media-handling settings

            /org/gnome/desktop/media-handling/autorun-never

            Malware on removable media may taking advantage of Autorun features when the media is inserted into a system and execute.

            Run the following script to ensure that autorun-never=true cannot be overridden:

            #!/usr/bin/env bash



            {

            # Check if GNOME Desktop Manager is installed. If package isn't installed, recommendation is Not Applicable\n

            # determine system's package manager

            l_pkgoutput=""

            if command -v dpkg-query > /dev/null 2>&1; then

            l_pq="dpkg-query -W"

            elif command -v rpm > /dev/null 2>&1; then

            l_pq="rpm -q"

            fi

            # Check if GDM is installed

            l_pcl="gdm gdm3" # Space separated list of packages to check

            for l_pn in $l_pcl; do

            $l_pq "$l_pn" > /dev/null 2>&1 && l_pkgoutput="y" && echo -e "\n - Package: \"$l_pn\" exists on the system\n - remediating configuration if needed"

            done

            # Check configuration (If applicable)

            if [ -n "$l_pkgoutput" ]; then

            # Look for autorun to determine profile in use, needed for remaining tests

            l_kfd="/etc/dconf/db/$(grep -Psril '^\h*autorun-never\b' /etc/dconf/db/*/ | awk -F'/' '{split($(NF-1),a,".");print a[1]}').d" #set directory of key file to be locked

            if [ -d "$l_kfd" ]; then # If key file directory doesn't exist, options can't be locked

            if grep -Prisq '^\h*\/org/gnome\/desktop\/media-handling\/autorun-never\b' "$l_kfd"; then

            echo " - \"autorun-never\" is locked in \"$(grep -Pril '^\h*\/org/gnome\/desktop\/media-handling\/autorun-never\b' "$l_kfd")\""

            else

            echo " - creating entry to lock \"autorun-never\""

            [ ! -d "$l_kfd"/locks ] && echo "creating directory $l_kfd/locks" && mkdir "$l_kfd"/locks

            {

            echo -e '\n# Lock desktop media-handling autorun-never setting'

            echo '/org/gnome/desktop/media-handling/autorun-never'

            } >> "$l_kfd"/locks/00-media-autorun

            fi

            else

            echo -e " - \"autorun-never\" is not set so it can not be locked\n - Please follow Recommendation \"Ensure GDM autorun-never is enabled\" and follow this Recommendation again"

            fi

            # update dconf database

            dconf update

            else

            echo -e " - GNOME Desktop Manager package is not installed on the system\n - Recommendation is not applicable"

            fi

            }

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Criterion: Ensure package name equals 'gdm3' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensure package name equals 'gdm' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Script: sce/nix_gdm_autorun_never_override_chk.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - "autorun-never" is not set so it can not be locked
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_1.8.9_Ensure_GDM_autorun-never_is_not_overridden"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.859-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/10/subcontrol/3"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/8/subcontrol/5"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1,CM-2, CM-6, CM-7, IA-5</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995219"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995219">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995219"
                                      check="all"
                                      check_existence="none_exist">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure package name equals 'gdm3' is not installed</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>None Exist</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995223"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995223">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995223"
                                      check="all"
                                      check_existence="none_exist">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure package name equals 'gdm' is not installed</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>None Exist</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/nix_gdm_autorun_never_override_chk.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/nix_gdm_autorun_never_override_chk.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/nix_gdm_autorun_never_override_chk.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** FAIL **</l>
                              <l> - Reason(s) for audit failure:</l>
                              <l/>
                              <l> - "autorun-never" is not set so it can not be locked</l>
                              <l/>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/nix_gdm_autorun_never_override_chk.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** FAIL **</li>
                                          <li> - Reason(s) for audit failure:</li>
                                          <li/>
                                          <li> - "autorun-never" is not set so it can not be locked</li>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-1,CM-2, CM-6, CM-7, IA-5

            CIS Controls V7.0:

            • Control 8: Malware Defenses: -- More
              CIS Control Information
              Control: Control the installation, spread, and execution of malicious code at multiple points in the enterprise, while optimizing the use of automation to enable rapid updating of defense, data gathering, and corrective action.
              Subcontrol: 8.5
              Label: Configure Devices Not To Auto-Run Content
              Description: Configure devices to not auto-run content from removable media.
            • >

            CIS Critical Security Controls V8.0:

            • Control 10: Malware Defenses: -- More
              CIS Control Information
              Control: Prevent or control the installation, spread, and execution of malicious applications, code, or scripts on enterprise assets.
              Safeguard: 10.3
              Label: Disable Autorun and Autoplay for Removable Media
              Description: Disable autorun and autoplay auto-execute functionality for removable media.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Pass

            1.8.10 Ensure XDCMP is not enabled

            Description:

            X Display Manager Control Protocol (XDMCP) is designed to provide authenticated access to display management services for remote displays

            XDMCP is inherently insecure.

            • XDMCP is not a ciphered protocol. This may allow an attacker to capture keystrokes entered by a user
            • XDMCP is vulnerable to man-in-the-middle attacks. This may allow an attacker to steal the credentials of legitimate users by impersonating the XDMCP server.

            Edit the file /etc/gdm3/custom.conf and remove the line:

            Enable=true

            Show Assessment Evidence
            Complex Check
            AND
            Criterion: Ensure no file named /etc/gdm3/custom.conf exists and matches pattern (?i)^\h*enable\h*=\h*true\b
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensure no file named /etc/gdm/custom.conf exists and matches pattern (?i)^\h*enable\h*=\h*true\b
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_1.8.10_Ensure_XDCMP_is_not_enabled"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.859-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: SI-4</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995228"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995228">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995228"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure no file named /etc/gdm3/custom.conf exists and matches pattern (?i)^\h*enable\h*=\h*true\b</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995231"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995231">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995231"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure no file named /etc/gdm/custom.conf exists and matches pattern (?i)^\h*enable\h*=\h*true\b</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: SI-4

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.2
              Label: Ensure Only Approved Ports, Protocols and Services Are Running
              Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            2 Services

            While applying system updates and patches helps correct known vulnerabilities, one of the best ways to protect the system against as yet unreported vulnerabilities is to disable all services that are not required for normal system operation. This prevents the exploitation of vulnerabilities discovered at a later date. If a service is not enabled, it cannot be exploited. The actions in this section of the document provide guidance on some services which can be safely disabled and under which circumstances, greatly reducing the number of possible threats to the resulting system. Additionally some services which should remain enabled but with secure configuration are covered as well as insecure service clients.

            Note: This should not be considered a comprehensive list of insecure services. You may wish to consider additions to those listed here for your environment.

            2.1 Configure Time Synchronization

            It is recommended that physical systems and virtual guests lacking direct access to the physical host's clock be configured to synchronize their time using a service such as systemd-timesyncd, chrony, or ntp.

            Note:

            • If access to a physical host's clock is available and configured according to site policy, this section can be skipped
            • Only one time synchronization method should be in use on the system
            • Only the section related to the time synchronization method in use on the system should be followed, all other time synchronization recommendations should be skipped
            • If access to a physical host's clock is available and configured according to site policy:
              • systemd-timesyncd should be stopped and masked
              • chrony should be removed from the system
              • ntp should be removed from the system

            2.1.1 Ensure time synchronization is in use

            It is recommended that physical systems and virtual guests lacking direct access to the physical host's clock be configured to synchronize their time using a service such as systemd-timesyncd, chrony, or ntp.

            Pass

            2.1.1.1 Ensure a single time synchronization daemon is in use

            Description:

            System time should be synchronized between all systems in an environment. This is typically done by establishing an authoritative time server or set of servers and having all systems synchronize their clocks to them.

            Note:

            • On virtual systems where host based time synchronization is available consult your virtualization software documentation and verify that host based synchronization is in use and follows local site policy. In this scenario, this section should be skipped
            • Only one time synchronization method should be in use on the system. Configuring multiple time synchronization methods could lead to unexpected or unreliable results

            Time synchronization is important to support time sensitive security mechanisms and ensures log files have consistent time records across the enterprise, which aids in forensic investigations.

            On physical systems, and virtual systems where host based time synchronization is not available.

            Select one of the three time synchronization daemons; chrony (1) , systemd-timesyncd (2) , or ntp (3) , and following the remediation procedure for the selected daemon.

            Note: enabling more than one synchronization daemon could lead to unexpected or unreliable results:

            1. chrony

            Run the following command to install chrony :

            # apt install chrony

            Run the following commands to stop and mask the systemd-timesyncd daemon:

            # systemctl stop systemd-timesyncd.service



            # systemctl --now mask systemd-timesyncd.service

            Run the following command to remove the ntp package:

            # apt purge ntp

            NOTE:

            • Subsection: Configure chrony should be followed
            • Subsections: Configure systemd-timesyncd and Configure ntp should be skipped
            1. systemd-timesyncd

            Run the following command to remove the chrony package:

            # apt purge chrony

            Run the following command to remove the ntp package:

            # apt purge ntp

            NOTE:

            • Subsection: Configure systemd-timesyncd should be followed
            • Subsections: Configure chrony and Configure ntp should be skipped
            1. ntp

            Run the following command to install ntp :

            # apt install ntp

            Run the following commands to stop and mask the systemd-timesyncd daemon:

            # systemctl stop systemd-timesyncd.service



            # systemctl --now mask systemd-timesyncd.service

            Run the following command to remove the chrony package:

            # apt purge chrony

            NOTE:

            • Subsection: Configure ntp should be followed
            • Subsections: Configure chrony and Configure systemd-timesyncd should be skipped

            Show Assessment Evidence
            Complex Check
            AND
            Script: sce/nix_timesync_daemon_chk.sh
            Result: Pass
            Exit Value: 101
            Output:
            • - Audit Result:
            • ** PASS **
            • - Only one time sync daemon is in use on the system
            • - Daemon: "systemd-timesyncd.service" is enabled on the system
            • - Package: "chrony" is not installed on the system
            • - Package: "ntp" is not installed on the system
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_2.1.1.1_Ensure_a_single_time_synchronization_daemon_is_in_use"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.860-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/1"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/8/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AU-3, AU-12</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/nix_timesync_daemon_chk.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/nix_timesync_daemon_chk.sh"
                                        xccdf="pass"
                                        script="/root/Assessor/sce/nix_timesync_daemon_chk.sh"
                                        exit-value="101">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** PASS **</l>
                              <l> - Only one time sync daemon is in use on the system</l>
                              <l>  - Daemon: "systemd-timesyncd.service" is enabled on the system</l>
                              <l>  - Package: "chrony" is not installed on the system</l>
                              <l>  - Package: "ntp" is not installed on the system</l>
                              <l/>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/nix_timesync_daemon_chk.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="pass">Pass</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>101</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** PASS **</li>
                                          <li> - Only one time sync daemon is in use on the system</li>
                                          <li>  - Daemon: "systemd-timesyncd.service" is enabled on the system</li>
                                          <li>  - Package: "chrony" is not installed on the system</li>
                                          <li>  - Package: "ntp" is not installed on the system</li>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: AU-3, AU-12

            CIS Controls V7.0:

            • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
              CIS Control Information
              Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
              Subcontrol: 6.1
              Label: Utilize Three Synchronized Time Sources
              Description: Use at least three synchronized time sources from which all servers and network devices retrieve time information on a regular basis so that timestamps in logs are consistent.
            • >

            CIS Critical Security Controls V8.0:

            • Control 8: Audit Log Management: -- More
              CIS Control Information
              Control: Collect, alert, review, and retain audit logs of events that could help detect, understand, or recover from an attack.
              Safeguard: 8.4
              Label: Standardize Time Synchronization
              Description: Standardize time synchronization. Configure at least two synchronized time sources across enterprise assets, where supported.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            2.1.2 Configure chrony

            chrony is a daemon which implements the Network Time Protocol (NTP) and is designed to synchronize system clocks across a variety of systems and use a source that is highly accurate.

            chrony can be configured to be a client and/or a server.

            More information on chrony can be found at: http://chrony.tuxfamily.org/ .

            Note:

            • If ntp or systemd-timesyncd are used, chrony should be removed and this section skipped
            • Only one time synchronization method should be in use on the system
            Manual

            2.1.2.1 Ensure chrony is configured with authorized timeserver

            Description:
            • server

              • The server directive specifies an NTP server which can be used as a time source. The client-server relationship is strictly hierarchical: a client might synchronize its system time to that of the server, but the server’s system time will never be influenced by that of a client.
              • This directive can be used multiple times to specify multiple servers.
              • The directive is immediately followed by either the name of the server, or its IP address.
            • pool

              • The syntax of this directive is similar to that for the server directive, except that it is used to specify a pool of NTP servers rather than a single NTP server. The pool name is expected to resolve to multiple addresses which might change over time.
              • This directive can be used multiple times to specify multiple pools.
              • All options valid in the server directive can be used in this directive too.

            Time synchronization is important to support time sensitive security mechanisms and to ensure log files have consistent time records across the enterprise to aid in forensic investigations

            Edit /etc/chrony/chrony.conf or a file ending in .sources in /etc/chrony/sources.d/ and add or edit server or pool lines as appropriate according to local site policy:

            <[server|pool]> <[remote-server|remote-pool]>

            Examples:

            pool directive:

            pool time.nist.gov iburst maxsources 4 #The maxsources option is unique to the pool directive

            server directive:

            server time-a-g.nist.gov iburst

            server 132.163.97.3 iburst

            server time-d-b.nist.gov iburst

            Run one of the following commands to load the updated time sources into chronyd running config:

            # systemctl restart chronyd



            - OR if sources are in a .sources file -



            # chronyc reload sources

            OR

            If another time synchronization service is in use on the system, run the following command to remove chrony from the system:

            # apt purge chrony

            Show Assessment Evidence
            Complex Check
            OR
            Criterion: Ensure at least one file(s) named ^.+\.(conf|sources) in /etc/chrony/ exists and matches pattern ^\h*(server|pool)\h+\H+
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            No matching system items were found.
            Criterion: Ensure package name equals 'chrony' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_2.1.2.1_Ensure_chrony_is_configured_with_authorized_timeserver"
                               role="unscored"
                               severity="unknown"
                               time="2024-04-14T23:46:23.860-04:00"
                               version="1"
                               weight="0.0">
               <xccdf:result>informational</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/1"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/8/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">chrony.conf(5) Manual Page</xccdf:ident>
               <xccdf:ident system="URL">https://tf.nist.gov/tf-cgi/servers.cgi</xccdf:ident>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AU-3, AU-12</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994873"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994873">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994873"
                                   check="all"
                                   check_existence="at_least_one_exists">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure at least one file(s) named ^.+\.(conf|sources) in /etc/chrony/ exists and matches pattern ^\h*(server|pool)\h+\H+</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>At Least One Exists</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994875"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994875">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994875"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'chrony' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: chrony.conf(5) Manual Page
            • URL: https://tf.nist.gov/tf-cgi/servers.cgi
            • URL: NIST SP 800-53 Rev. 5: AU-3, AU-12

            CIS Controls V7.0:

            • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
              CIS Control Information
              Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
              Subcontrol: 6.1
              Label: Utilize Three Synchronized Time Sources
              Description: Use at least three synchronized time sources from which all servers and network devices retrieve time information on a regular basis so that timestamps in logs are consistent.
            • >

            CIS Critical Security Controls V8.0:

            • Control 8: Audit Log Management: -- More
              CIS Control Information
              Control: Collect, alert, review, and retain audit logs of events that could help detect, understand, or recover from an attack.
              Safeguard: 8.4
              Label: Standardize Time Synchronization
              Description: Standardize time synchronization. Configure at least two synchronized time sources across enterprise assets, where supported.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Pass

            2.1.2.2 Ensure chrony is running as user _chrony

            Description:

            The chrony package is installed with a dedicated user account _chrony . This account is granted the access required by the chronyd service

            The chronyd service should run with only the required privlidges

            Add or edit the user line to /etc/chrony/chrony.conf or a file ending in .conf in /etc/chrony/conf.d/ :

            user _chrony

            OR

            If another time synchronization service is in use on the system, run the following command to remove chrony from the system:

            # apt purge chrony

            Show Assessment Evidence
            Complex Check
            OR
            Script: sce/nix_service_owned_by_user_chk.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Start check - systemd service process is owned by user
            • - FAIL!
            • - systemd service: "" with PID: "" is owned by user: ""
            • - End check - systemd service process is owned by user
            No error lines were collected.
            Criterion: Ensure package name equals 'chrony' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_2.1.2.2_Ensure_chrony_is_running_as_user__chrony"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.860-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/1"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/8/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AU-8</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                         value-id="xccdf_org.cisecurity.benchmarks_value_3994877_var"/>
                     <xccdf:check-content-ref href="sce/nix_service_owned_by_user_chk.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/nix_service_owned_by_user_chk.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/nix_service_owned_by_user_chk.sh"
                                        exit-value="102">
                           <out>
                              <l>- Start check - systemd service process is owned by user</l>
                              <l>- FAIL!</l>
                              <l>- systemd service: "" with PID: ""  is owned by user: ""</l>
                              <l>- End check - systemd service process is owned by user</l>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/nix_service_owned_by_user_chk.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li>- Start check - systemd service process is owned by user</li>
                                          <li>- FAIL!</li>
                                          <li>- systemd service: "" with PID: ""  is owned by user: ""</li>
                                          <li>- End check - systemd service process is owned by user</li>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994878"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994878">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994878"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'chrony' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: AU-8

            CIS Controls V7.0:

            • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
              CIS Control Information
              Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
              Subcontrol: 6.1
              Label: Utilize Three Synchronized Time Sources
              Description: Use at least three synchronized time sources from which all servers and network devices retrieve time information on a regular basis so that timestamps in logs are consistent.
            • >

            CIS Critical Security Controls V8.0:

            • Control 8: Audit Log Management: -- More
              CIS Control Information
              Control: Collect, alert, review, and retain audit logs of events that could help detect, understand, or recover from an attack.
              Safeguard: 8.4
              Label: Standardize Time Synchronization
              Description: Standardize time synchronization. Configure at least two synchronized time sources across enterprise assets, where supported.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Pass

            2.1.2.3 Ensure chrony is enabled and running

            Description:

            chrony is a daemon for synchronizing the system clock across the network

            chrony needs to be enabled and running in order to synchronize the system to a timeserver.

            Time synchronization is important to support time sensitive security mechanisms and to ensure log files have consistent time records across the enterprise to aid in forensic investigations

            IFchrony is in use on the system, run the following commands:

            Run the following command to unmask chrony.service :

            # systemctl unmask chrony.service

            Run the following command to enable and start chrony.service :

            # systemctl --now enable chrony.service

            OR

            If another time synchronization service is in use on the system, run the following command to remove chrony :

            # apt purge chrony

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Criterion: Ensure systemd 'chrony.service' unit 'UnitFileState' property equals 'enabled'
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            Systemdunitproperty Item
            Name Type Status Value
            Unit String Exists chrony.service
            Property String Exists UnitFileState
            Value String Exists No Value
            Criterion: Ensure systemd 'chrony.service' unit 'ActiveState' property equals 'active'
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            Systemdunitproperty Item
            Name Type Status Value
            Unit String Exists chrony.service
            Property String Exists ActiveState
            Value String Exists inactive
            Criterion: Ensure package name equals 'chrony' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_2.1.2.3_Ensure_chrony_is_enabled_and_running"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.860-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/1"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/8/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AU-8</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-export export-name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3994880"
                                            value-id="xccdf_org.cisecurity.benchmarks_value_3994880_var"/>
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994880"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994880">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994880"
                                      check="all"
                                      check_existence="at_least_one_exists">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure systemd 'chrony.service' unit 'UnitFileState' property equals 'enabled'</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>At Least One Exists</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="fail">Fail</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <caption>Systemdunitproperty Item</caption>
                                       <thead>
                                          <tr>
                                             <th scope="col">Name</th>
                                             <th scope="col">Type</th>
                                             <th scope="col">Status</th>
                                             <th scope="col">Value</th>
                                          </tr>
                                       </thead>
                                       <tbody class="tbe">
                                          <tr>
                                             <td>Unit</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>chrony.service</td>
                                          </tr>
                                          <tr>
                                             <td>Property</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>UnitFileState</td>
                                          </tr>
                                          <tr class="evaluated">
                                             <td>Value</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>No Value</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-export export-name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3994882"
                                            value-id="xccdf_org.cisecurity.benchmarks_value_3994882_var"/>
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994882"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994882">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994882"
                                      check="all"
                                      check_existence="at_least_one_exists">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure systemd 'chrony.service' unit 'ActiveState' property equals 'active'</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>At Least One Exists</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="fail">Fail</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <caption>Systemdunitproperty Item</caption>
                                       <thead>
                                          <tr>
                                             <th scope="col">Name</th>
                                             <th scope="col">Type</th>
                                             <th scope="col">Status</th>
                                             <th scope="col">Value</th>
                                          </tr>
                                       </thead>
                                       <tbody class="tbe">
                                          <tr>
                                             <td>Unit</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>chrony.service</td>
                                          </tr>
                                          <tr>
                                             <td>Property</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>ActiveState</td>
                                          </tr>
                                          <tr class="evaluated">
                                             <td>Value</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>inactive</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994884"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994884">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994884"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'chrony' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: AU-8

            CIS Controls V7.0:

            • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
              CIS Control Information
              Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
              Subcontrol: 6.1
              Label: Utilize Three Synchronized Time Sources
              Description: Use at least three synchronized time sources from which all servers and network devices retrieve time information on a regular basis so that timestamps in logs are consistent.
            • >

            CIS Critical Security Controls V8.0:

            • Control 8: Audit Log Management: -- More
              CIS Control Information
              Control: Collect, alert, review, and retain audit logs of events that could help detect, understand, or recover from an attack.
              Safeguard: 8.4
              Label: Standardize Time Synchronization
              Description: Standardize time synchronization. Configure at least two synchronized time sources across enterprise assets, where supported.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            2.1.3 Configure systemd-timesyncd

            systemd-timesyncd is a daemon that has been added for synchronizing the system clock across the network. It implements an SNTP client. In contrast to NTP implementations such as chrony or the NTP reference server this only implements a client side, and does not bother with the full NTP complexity, focusing only on querying time from one remote server and synchronizing the local clock to it. The daemon runs with minimal privileges, and has been hooked up with networkd to only operate when network connectivity is available. The daemon saves the current clock to disk every time a new NTP sync has been acquired, and uses this to possibly correct the system clock early at bootup, in order to accommodate for systems that lack an RTC such as the Raspberry Pi and embedded devices, and make sure that time monotonically progresses on these systems, even if it is not always correct. To make use of this daemon a new system user and group "systemd-timesync" needs to be created on installation of systemd.

            The default configuration is set during compilation, so configuration is only needed when it is necessary to deviate from those defaults. Initially, the main configuration file in /etc/systemd/ contains commented out entries showing the defaults as a guide to the administrator. Local overrides can be created by editing this file or by creating drop-ins, as described below. Using drop-ins for local configuration is recommended over modifications to the main configuration file.

            In addition to the "main" configuration file, drop-in configuration snippets are read from /usr/lib/systemd/*.conf.d/ , /usr/local/lib/systemd/*.conf.d/ , and /etc/systemd/*.conf.d/ . Those drop-ins have higher precedence and override the main configuration file. Files in the *.conf.d/ configuration subdirectories are sorted by their filename in lexicographic order, regardless of in which of the subdirectories they reside. When multiple files specify the same option, for options which accept just a single value, the entry in the file sorted last takes precedence, and for options which accept a list of values, entries are collected as they occur in the sorted files.

            When packages need to customize the configuration, they can install drop-ins under /usr/. Files in /etc/ are reserved for the local administrator, who may use this logic to override the configuration files installed by vendor packages. Drop-ins have to be used to override package drop-ins, since the main configuration file has lower precedence. It is recommended to prefix all filenames in those subdirectories with a two-digit number and a dash, to simplify the ordering of the files.

            To disable a configuration file supplied by the vendor, the recommended way is to place a symlink to /dev/null in the configuration directory in /etc/, with the same filename as the vendor configuration file.

            Note:

            • The recommendations in this section only apply if timesyncd is in use on the system
            • The systemd-timesyncd service specifically implements only SNTP.
              • This minimalistic service will set the system clock for large offsets or slowly adjust it for smaller deltas
              • More complex use cases are not covered by systemd-timesyncd
            • If chrony or ntp are used, systemd-timesyncd should be stopped and masked, and this section skipped
            • One, and only one, time synchronization method should be in use on the system
            Fail

            2.1.3.1 Ensure systemd-timesyncd configured with authorized timeserver

            Description:

            NTP=

            • A space-separated list of NTP server host names or IP addresses. During runtime this list is combined with any per-interface NTP servers acquired from systemd-networkd.service(8). systemd-timesyncd will contact all configured system or per-interface servers in turn, until one responds. When the empty string is assigned, the list of NTP servers is reset, and all prior assignments will have no effect. This setting defaults to an empty list.

            FallbackNTP=

            • A space-separated list of NTP server host names or IP addresses to be used as the fallback NTP servers. Any per-interface NTP servers obtained from systemd-networkd.service(8) take precedence over this setting, as do any servers set via NTP= above. This setting is hence only relevant if no other NTP server information is known. When the empty string is assigned, the list of NTP servers is reset, and all prior assignments will have no effect. If this option is not given, a compiled-in list of NTP servers is used.

            Time synchronization is important to support time sensitive security mechanisms and to ensure log files have consistent time records across the enterprise to aid in forensic investigations

            Edit /etc/systemd/timesyncd.conf and add the NTP= and/or FallbackNTP= lines to the [Time] section:

            Example:

            [Time]

            NTP=time.nist.gov # Uses the generic name for NIST's time servers

            -AND/OR-

            FallbackNTP=time-a-g.nist.gov time-b-g.nist.gov time-c-g.nist.gov # Space separated list of NIST time servers

            Note: Servers added to these line(s) should follow local site policy. NIST servers are for example.

            Example script:

            The following example script will add the example NIST time servers to /etc/systemd/timesyncd.conf

            #!/usr/bin/env bash



            {

            l_ntp_ts="time.nist.gov"

            l_ntp_fb="time-a-g.nist.gov time-b-g.nist.gov time-c-g.nist.gov"

            l_conf_file="/etc/systemd/timesyncd.conf"

            if ! grep -Ph '^\h*NTP=\H+' "$l_conf_file"; then

            ! grep -Pqs '^\h*\[Time\]' "$l_conf_file" && echo "[Time]" >> "$l_conf_file"

            echo "NTP=$l_ntp_ts" >> "$l_conf_file"

            fi

            if ! grep -Ph '^\h*FallbackNTP=\H+' "$l_conf_file"; then

            ! grep -Pqs '^\h*\[Time\]' "$l_conf_file" && echo "[Time]" >> "$l_conf_file"

            echo "FallbackNTP=$l_ntp_fb" >> "$l_conf_file"

            fi

            }

            Run the following command to reload the systemd-timesyncd configuration:

            # systemctl try-reload-or-restart systemd-timesyncd

            -OR-

            If another time synchronization service is in use on the system, run the following command to stop and mask systemd-timesyncd :

            # systemctl --now mask systemd-timesyncd

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Criterion: Ensure systemd 'systemd-timesyncd.service' unit 'UnitFileState' property not equal 'enabled'
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            Systemdunitproperty Item
            Name Type Status Value
            Unit String Exists systemd-timesyncd.service
            Property String Exists UnitFileState
            Value String Exists enabled
            Criterion: Ensure systemd 'systemd-timesyncd.service' unit 'ActiveState' property not equal 'active'
            Existence Check: At Least One Exists
            Item Check: All
            Result: Pass
            Systemdunitproperty Item
            Name Type Status Value
            Unit String Exists systemd-timesyncd.service
            Property String Exists ActiveState
            Value String Exists inactive
            Criterion: Ensure at least one file(s) named ^.+\.conf in /etc/systemd/ exists and matches pattern ^\h*(NTP|FallbackNTP)=\H+
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_2.1.3.1_Ensure_systemd-timesyncd_configured_with_authorized_timeserver"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.860-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/1"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/8/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">https://www.freedesktop.org/software/systemd/man/timesyncd.conf.html</xccdf:ident>
               <xccdf:ident system="URL">https://tf.nist.gov/tf-cgi/servers.cgi</xccdf:ident>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AU-7, AU-8</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-export export-name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3994887"
                                            value-id="xccdf_org.cisecurity.benchmarks_value_3994887_var"/>
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994887"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994887">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994887"
                                      check="all"
                                      check_existence="at_least_one_exists">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure systemd 'systemd-timesyncd.service' unit 'UnitFileState' property not equal 'enabled'</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>At Least One Exists</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="fail">Fail</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <caption>Systemdunitproperty Item</caption>
                                       <thead>
                                          <tr>
                                             <th scope="col">Name</th>
                                             <th scope="col">Type</th>
                                             <th scope="col">Status</th>
                                             <th scope="col">Value</th>
                                          </tr>
                                       </thead>
                                       <tbody class="tbe">
                                          <tr>
                                             <td>Unit</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>systemd-timesyncd.service</td>
                                          </tr>
                                          <tr>
                                             <td>Property</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>UnitFileState</td>
                                          </tr>
                                          <tr class="evaluated">
                                             <td>Value</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>enabled</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-export export-name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3994889"
                                            value-id="xccdf_org.cisecurity.benchmarks_value_3994889_var"/>
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994889"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994889">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994889"
                                      check="all"
                                      check_existence="at_least_one_exists">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure systemd 'systemd-timesyncd.service' unit 'ActiveState' property not equal 'active'</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>At Least One Exists</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <caption>Systemdunitproperty Item</caption>
                                       <thead>
                                          <tr>
                                             <th scope="col">Name</th>
                                             <th scope="col">Type</th>
                                             <th scope="col">Status</th>
                                             <th scope="col">Value</th>
                                          </tr>
                                       </thead>
                                       <tbody class="tbe">
                                          <tr>
                                             <td>Unit</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>systemd-timesyncd.service</td>
                                          </tr>
                                          <tr>
                                             <td>Property</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>ActiveState</td>
                                          </tr>
                                          <tr class="evaluated">
                                             <td>Value</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>inactive</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994886"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994886">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994886"
                                   check="all"
                                   check_existence="at_least_one_exists">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure at least one file(s) named ^.+\.conf in /etc/systemd/ exists and matches pattern ^\h*(NTP|FallbackNTP)=\H+</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>At Least One Exists</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: https://www.freedesktop.org/software/systemd/man/timesyncd.conf.html
            • URL: https://tf.nist.gov/tf-cgi/servers.cgi
            • URL: NIST SP 800-53 Rev. 5: AU-7, AU-8

            CIS Controls V7.0:

            • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
              CIS Control Information
              Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
              Subcontrol: 6.1
              Label: Utilize Three Synchronized Time Sources
              Description: Use at least three synchronized time sources from which all servers and network devices retrieve time information on a regular basis so that timestamps in logs are consistent.
            • >

            CIS Critical Security Controls V8.0:

            • Control 8: Audit Log Management: -- More
              CIS Control Information
              Control: Collect, alert, review, and retain audit logs of events that could help detect, understand, or recover from an attack.
              Safeguard: 8.4
              Label: Standardize Time Synchronization
              Description: Standardize time synchronization. Configure at least two synchronized time sources across enterprise assets, where supported.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Manual

            2.1.3.2 Ensure systemd-timesyncd is enabled and running

            Description:

            systemd-timesyncd is a daemon that has been added for synchronizing the system clock across the network

            systemd-timesyncd needs to be enabled and running in order to synchronize the system to a timeserver.

            Time synchronization is important to support time sensitive security mechanisms and to ensure log files have consistent time records across the enterprise to aid in forensic investigations

            IFsystemd-timesyncd is in use on the system, run the following commands:

            Run the following command to unmask systemd-timesyncd.service :

            # systemctl unmask systemd-timesyncd.service

            Run the following command to enable and start systemd-timesyncd.service :

            # systemctl --now enable systemd-timesyncd.service

            OR

            If another time synchronization service is in use on the system, run the following command to stop and mask systemd-timesyncd :

            # systemctl --now mask systemd-timesyncd.service

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Criterion: Ensure systemd 'systemd-timesyncd.service' unit 'UnitFileState' property equals 'enabled'
            Existence Check: At Least One Exists
            Item Check: All
            Result: Pass
            Systemdunitproperty Item
            Name Type Status Value
            Unit String Exists systemd-timesyncd.service
            Property String Exists UnitFileState
            Value String Exists enabled
            Criterion: Ensure systemd 'systemd-timesyncd.service' unit 'ActiveState' property equals 'active'
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            Systemdunitproperty Item
            Name Type Status Value
            Unit String Exists systemd-timesyncd.service
            Property String Exists ActiveState
            Value String Exists inactive
            Complex Check
            AND
            Criterion: Ensure systemd 'systemd-timesyncd.service' unit 'UnitFileState' property equals 'masked'
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            Systemdunitproperty Item
            Name Type Status Value
            Unit String Exists systemd-timesyncd.service
            Property String Exists UnitFileState
            Value String Exists enabled
            Criterion: Ensure systemd 'systemd-timesyncd.service' unit 'ActiveState' property equals 'inactive'
            Existence Check: At Least One Exists
            Item Check: All
            Result: Pass
            Systemdunitproperty Item
            Name Type Status Value
            Unit String Exists systemd-timesyncd.service
            Property String Exists ActiveState
            Value String Exists inactive


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_2.1.3.2_Ensure_systemd-timesyncd_is_enabled_and_running"
                               role="unscored"
                               severity="unknown"
                               time="2024-04-14T23:46:23.861-04:00"
                               version="1"
                               weight="0.0">
               <xccdf:result>informational</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/1"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/8/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AU-7, AU-8</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-export export-name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3994891"
                                            value-id="xccdf_org.cisecurity.benchmarks_value_3994891_var"/>
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994891"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994891">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994891"
                                      check="all"
                                      check_existence="at_least_one_exists">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure systemd 'systemd-timesyncd.service' unit 'UnitFileState' property equals 'enabled'</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>At Least One Exists</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <caption>Systemdunitproperty Item</caption>
                                       <thead>
                                          <tr>
                                             <th scope="col">Name</th>
                                             <th scope="col">Type</th>
                                             <th scope="col">Status</th>
                                             <th scope="col">Value</th>
                                          </tr>
                                       </thead>
                                       <tbody class="tbe">
                                          <tr>
                                             <td>Unit</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>systemd-timesyncd.service</td>
                                          </tr>
                                          <tr>
                                             <td>Property</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>UnitFileState</td>
                                          </tr>
                                          <tr class="evaluated">
                                             <td>Value</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>enabled</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-export export-name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3994893"
                                            value-id="xccdf_org.cisecurity.benchmarks_value_3994893_var"/>
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994893"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994893">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994893"
                                      check="all"
                                      check_existence="at_least_one_exists">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure systemd 'systemd-timesyncd.service' unit 'ActiveState' property equals 'active'</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>At Least One Exists</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="fail">Fail</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <caption>Systemdunitproperty Item</caption>
                                       <thead>
                                          <tr>
                                             <th scope="col">Name</th>
                                             <th scope="col">Type</th>
                                             <th scope="col">Status</th>
                                             <th scope="col">Value</th>
                                          </tr>
                                       </thead>
                                       <tbody class="tbe">
                                          <tr>
                                             <td>Unit</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>systemd-timesyncd.service</td>
                                          </tr>
                                          <tr>
                                             <td>Property</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>ActiveState</td>
                                          </tr>
                                          <tr class="evaluated">
                                             <td>Value</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>inactive</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-export export-name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3994894"
                                            value-id="xccdf_org.cisecurity.benchmarks_value_3994894_var"/>
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994894"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994894">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994894"
                                      check="all"
                                      check_existence="at_least_one_exists">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure systemd 'systemd-timesyncd.service' unit 'UnitFileState' property equals 'masked'</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>At Least One Exists</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="fail">Fail</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <caption>Systemdunitproperty Item</caption>
                                       <thead>
                                          <tr>
                                             <th scope="col">Name</th>
                                             <th scope="col">Type</th>
                                             <th scope="col">Status</th>
                                             <th scope="col">Value</th>
                                          </tr>
                                       </thead>
                                       <tbody class="tbe">
                                          <tr>
                                             <td>Unit</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>systemd-timesyncd.service</td>
                                          </tr>
                                          <tr>
                                             <td>Property</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>UnitFileState</td>
                                          </tr>
                                          <tr class="evaluated">
                                             <td>Value</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>enabled</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-export export-name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3994896"
                                            value-id="xccdf_org.cisecurity.benchmarks_value_3994896_var"/>
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994896"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994896">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994896"
                                      check="all"
                                      check_existence="at_least_one_exists">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure systemd 'systemd-timesyncd.service' unit 'ActiveState' property equals 'inactive'</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>At Least One Exists</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <caption>Systemdunitproperty Item</caption>
                                       <thead>
                                          <tr>
                                             <th scope="col">Name</th>
                                             <th scope="col">Type</th>
                                             <th scope="col">Status</th>
                                             <th scope="col">Value</th>
                                          </tr>
                                       </thead>
                                       <tbody class="tbe">
                                          <tr>
                                             <td>Unit</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>systemd-timesyncd.service</td>
                                          </tr>
                                          <tr>
                                             <td>Property</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>ActiveState</td>
                                          </tr>
                                          <tr class="evaluated">
                                             <td>Value</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>inactive</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: AU-7, AU-8

            CIS Controls V7.0:

            • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
              CIS Control Information
              Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
              Subcontrol: 6.1
              Label: Utilize Three Synchronized Time Sources
              Description: Use at least three synchronized time sources from which all servers and network devices retrieve time information on a regular basis so that timestamps in logs are consistent.
            • >

            CIS Critical Security Controls V8.0:

            • Control 8: Audit Log Management: -- More
              CIS Control Information
              Control: Collect, alert, review, and retain audit logs of events that could help detect, understand, or recover from an attack.
              Safeguard: 8.4
              Label: Standardize Time Synchronization
              Description: Standardize time synchronization. Configure at least two synchronized time sources across enterprise assets, where supported.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            2.1.4 Configure ntp

            ntp is a daemon which implements the Network Time Protocol (NTP). It is designed to synchronize system clocks across a variety of systems and use a source that is highly accurate. More information on NTP can be found at http://www.ntp.org . ntp can be configured to be a client and/or a server.

            Note:

            • If chrony or systemd-timesyncd are used, ntp should be removed and this section skipped
            • This recommendation only applies if ntp is in use on the system
            • Only one time synchronization method should be in use on the system
            Pass

            2.1.4.1 Ensure ntp access control is configured

            Description:

            ntp Access Control Commands:

            restrict address [mask mask] [ippeerlimit int] [flag ...]

            The address argument expressed in dotted-quad form is the address of a host or network. Alternatively, the address argument can be a valid host DNS name.

            The mask argument expressed in dotted-quad form defaults to 255.255.255.255, meaning that the address is treated as the address of an individual host. A default entry (address 0.0.0.0, mask 0.0.0.0) is always included and is always the first entry in the list. Note: the text string default, with no mask option, may be used to indicate the default entry.

            The ippeerlimit directive limits the number of peer requests for each IP to int, where a value of -1 means "unlimited", the current default. A value of 0 means "none". There would usually be at most 1 peering request per IP, but if the remote peering requests are behind a proxy there could well be more than 1 per IP. In the current implementation, flag always restricts access, i.e., an entry with no flags indicates that free access to the server is to be given.

            The flags are not orthogonal, in that more restrictive flags will often make less restrictive ones redundant. The flags can generally be classed into two categories, those which restrict time service and those which restrict informational queries and attempts to do run-time reconfiguration of the server.

            One or more of the following flags may be specified:

            • kod - If this flag is set when an access violation occurs, a kiss-o'-death (KoD) packet is sent. KoD packets are rate limited to no more than one per second. If another KoD packet occurs within one second after the last one, the packet is dropped.
            • limited - Deny service if the packet spacing violates the lower limits specified in the discard command. A history of clients is kept using the monitoring capability of ntpd . Thus, monitoring is always active as long as there is a restriction entry with the limited flag.
            • lowpriotrap - Declare traps set by matching hosts to be low priority. The number of traps a server can maintain is limited (the current limit is 3). Traps are usually assigned on a first come, first served basis, with later trap requestors being denied service. This flag modifies the assignment algorithm by allowing low priority traps to be overridden by later requests for normal priority traps.
            • noepeer - Deny ephemeral peer requests, even if they come from an authenticated source. Note that the ability to use a symmetric key for authentication may be restricted to one or more IPs or subnets via the third field of the ntp.keys file. This restriction is not enabled by default, to maintain backward compatibility. Expect noepeer to become the default in ntp-4.4 .
            • nomodify - Deny ntpq and ntpdc queries which attempt to modify the state of the server (i.e., run time reconfiguration). Queries which return information are permitted.
            • noquery - Deny ntpq and ntpdc queries. Time service is not affected.
            • nopeer - Deny unauthenticated packets which would result in mobilizing a new association. This includes broadcast and symmetric active packets when a configured association does not exist. It also includes pool associations, so if you want to use servers from a pool directive and also want to use nopeer by default, you'll want a restrict source ... line as well that does not include the nopeer directive.
            • noserve - Deny all packets except ntpq and ntpdc queries.
            • notrap - Decline to provide mode 6 control message trap service to matching hosts. The trap service is a subsystem of the ntpq control message protocol which is intended for use by remote event logging programs.
            • notrust - Deny service unless the packet is cryptographically authenticated.
            • ntpport - This is actually a match algorithm modifier, rather than a restriction flag. Its presence causes the restriction entry to be matched only if the source port in the packet is the standard NTP UDP port (123). Both ntpport and non-ntpport may be specified. The ntpport is considered more specific and is sorted later in the list.

            If ntp is in use on the system, proper configuration is vital to ensuring time synchronization is accurate.

            Add or edit restrict lines in /etc/ntp.conf to match the following:

            restrict -4 default kod nomodify notrap nopeer noquery

            restrict -6 default kod nomodify notrap nopeer noquery

            OR

            If another time synchronization service is in use on the system, run the following command to remove ntp from the system:

            # apt purge ntp

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Criterion: Ensure at least one file named /etc/ntp.conf exists and matches pattern ^\h*restrict\h+(-4\h+)?default\h+(?:[^#\n\r]+\h+)*(?!(?:\2|\3|\4|\5))(\h*\bkod\b\h*|\h*\bnomodify\b\h*|\h*\bnotrap\b\h*|\h*\bnopeer\b\h*|\h*\bnoquery\b\h*)\h+(?:[^#\n\r]+\h+)*(?!(?:\1
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            No matching system items were found.
            Criterion: Ensure at least one file named /etc/ntp.conf exists and matches pattern ^\h*restrict\h+-6\h+default\h+(?:[^#\n\r]+\h+)*(?!(?:\2|\3|\4|\5))(\h*\bkod\b\h*|\h*\bnomodify\b\h*|\h*\bnotrap\b\h*|\h*\bnopeer\b\h*|\h*\bnoquery\b\h*)\h+(?:[^#\n\r]+\h+)*(?!(?:\1|\3
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            No matching system items were found.
            Criterion: Ensure package name equals 'ntp' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_2.1.4.1_Ensure_ntp_access_control_is_configured"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.861-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/1"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/8/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">http://www.ntp.org/</xccdf:ident>
               <xccdf:ident system="URL">ntp.conf(5)</xccdf:ident>
               <xccdf:ident system="URL">ntpd(8)</xccdf:ident>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AU-8</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994897"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994897">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994897"
                                      check="all"
                                      check_existence="at_least_one_exists">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure at least one file named /etc/ntp.conf exists and matches pattern ^\h*restrict\h+(-4\h+)?default\h+(?:[^#\n\r]+\h+)*(?!(?:\2|\3|\4|\5))(\h*\bkod\b\h*|\h*\bnomodify\b\h*|\h*\bnotrap\b\h*|\h*\bnopeer\b\h*|\h*\bnoquery\b\h*)\h+(?:[^#\n\r]+\h+)*(?!(?:\1</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>At Least One Exists</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="fail">Fail</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994899"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994899">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994899"
                                      check="all"
                                      check_existence="at_least_one_exists">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure at least one file named /etc/ntp.conf exists and matches pattern ^\h*restrict\h+-6\h+default\h+(?:[^#\n\r]+\h+)*(?!(?:\2|\3|\4|\5))(\h*\bkod\b\h*|\h*\bnomodify\b\h*|\h*\bnotrap\b\h*|\h*\bnopeer\b\h*|\h*\bnoquery\b\h*)\h+(?:[^#\n\r]+\h+)*(?!(?:\1|\3</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>At Least One Exists</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="fail">Fail</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994901"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994901">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994901"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'ntp' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: http://www.ntp.org/
            • URL: ntp.conf(5)
            • URL: ntpd(8)
            • URL: NIST SP 800-53 Rev. 5: AU-8

            CIS Controls V7.0:

            • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
              CIS Control Information
              Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
              Subcontrol: 6.1
              Label: Utilize Three Synchronized Time Sources
              Description: Use at least three synchronized time sources from which all servers and network devices retrieve time information on a regular basis so that timestamps in logs are consistent.
            • >

            CIS Critical Security Controls V8.0:

            • Control 8: Audit Log Management: -- More
              CIS Control Information
              Control: Collect, alert, review, and retain audit logs of events that could help detect, understand, or recover from an attack.
              Safeguard: 8.4
              Label: Standardize Time Synchronization
              Description: Standardize time synchronization. Configure at least two synchronized time sources across enterprise assets, where supported.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Manual

            2.1.4.2 Ensure ntp is configured with authorized timeserver

            Description:

            The various modes are determined by the command keyword and the type of the required IP address. Addresses are classed by type as (s) a remote server or peer (IPv4 class A, B and C), (b) the broadcast address of a local interface, (m) a multicast address (IPv4 class D), or (r) a reference clock address (127.127.x.x).

            Note: That only those options applicable to each command are listed below. Use of options not listed may not be caught as an error, but may result in some weird and even destructive behavior.

            If the Basic Socket Interface Extensions for IPv6 (RFC-2553) is detected, support for the IPv6 address family is generated in addition to the default support of the IPv4 address family. In a few cases, including the reslist billboard generated by ntpq or ntpdc , IPv6 addresses are automatically generated. IPv6 addresses can be identified by the presence of colons “:” in the address field. IPv6 addresses can be used almost everywhere where IPv4 addresses can be used, with the exception of reference clock addresses, which are always IPv4.

            Note: In contexts where a host name is expected, a -4 qualifier preceding the host name forces DNS resolution to the IPv4 namespace, while a -6 qualifier forces DNS resolution to the IPv6 namespace. See IPv6 references for the equivalent classes for that address family.

            • pool - For type s addresses, this command mobilizes a persistent client mode association with a number of remote servers. In this mode the local clock can synchronized to the remote server, but the remote server can never be synchronized to the local clock.

            • server - For type s and r addresses, this command mobilizes a persistent client mode association with the specified remote server or local radio clock. In this mode the local clock can synchronized to the remote server, but the remote server can never be synchronized to the local clock. This command should not be used for type b or m addresses.

            Time synchronization is important to support time sensitive security mechanisms and to ensure log files have consistent time records across the enterprise to aid in forensic investigations

            Edit /etc/ntp.conf and add or edit server or pool lines as appropriate according to local site policy:

            <[server|pool]> <[remote-server|remote-pool]>

            Examples:

            pool mode:

            pool time.nist.gov iburst

            server mode:

            server time-a-g.nist.gov iburst

            server 132.163.97.3 iburst

            server time-d-b.nist.gov iburst

            Run the following command to load the updated time sources into ntp running config:

            # systemctl restart ntp

            OR

            If another time synchronization service is in use on the system, run the following command to remove ntp from the system:

            # apt purge ntp

            Show Assessment Evidence
            Complex Check
            OR
            Criterion: Ensure at least one file named /etc/ntp.conf exists and matches pattern ^\h*(server|pool)\h+\H+
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            No matching system items were found.
            Criterion: Ensure package name equals 'ntp' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_2.1.4.2_Ensure_ntp_is_configured_with_authorized_timeserver"
                               role="unscored"
                               severity="unknown"
                               time="2024-04-14T23:46:23.861-04:00"
                               version="1"
                               weight="0.0">
               <xccdf:result>informational</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/1"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/8/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">http://www.ntp.org/</xccdf:ident>
               <xccdf:ident system="URL">https://tf.nist.gov/tf-cgi/servers.cgi</xccdf:ident>
               <xccdf:ident system="URL">ntp.conf(5)</xccdf:ident>
               <xccdf:ident system="URL">ntpd(8)</xccdf:ident>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AU-8</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994903"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994903">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994903"
                                   check="all"
                                   check_existence="at_least_one_exists">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure at least one file named /etc/ntp.conf exists and matches pattern ^\h*(server|pool)\h+\H+</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>At Least One Exists</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994904"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994904">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994904"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'ntp' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: http://www.ntp.org/
            • URL: https://tf.nist.gov/tf-cgi/servers.cgi
            • URL: ntp.conf(5)
            • URL: ntpd(8)
            • URL: NIST SP 800-53 Rev. 5: AU-8

            CIS Controls V7.0:

            • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
              CIS Control Information
              Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
              Subcontrol: 6.1
              Label: Utilize Three Synchronized Time Sources
              Description: Use at least three synchronized time sources from which all servers and network devices retrieve time information on a regular basis so that timestamps in logs are consistent.
            • >

            CIS Critical Security Controls V8.0:

            • Control 8: Audit Log Management: -- More
              CIS Control Information
              Control: Collect, alert, review, and retain audit logs of events that could help detect, understand, or recover from an attack.
              Safeguard: 8.4
              Label: Standardize Time Synchronization
              Description: Standardize time synchronization. Configure at least two synchronized time sources across enterprise assets, where supported.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Pass

            2.1.4.3 Ensure ntp is running as user ntp

            Description:

            The ntp package is installed with a dedicated user account ntp . This account is granted the access required by the ntpd daemon

            Note:

            • If chrony or systemd-timesyncd are used, ntp should be removed and this section skipped
            • This recommendation only applies if ntp is in use on the system
            • Only one time synchronization method should be in use on the system

            The ntpd daemon should run with only the required privlidge

            Add or edit the following line in /usr/lib/ntp/ntp-systemd-wrapper :

            RUNASUSER=ntp

            Run the following command to restart ntp.servocee :

            # systemctl restart ntp.service

            OR

            If another time synchronization service is in use on the system, run the following command to remove ntp from the system:

            # apt purge ntp

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Script: sce/nix_service_owned_by_user_chk.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Start check - systemd service process is owned by user
            • - FAIL!
            • - systemd service: "" with PID: "" is owned by user: ""
            • - End check - systemd service process is owned by user
            No error lines were collected.
            Criterion: Ensure at least one file named /etc/init.d/ntp exists and matches pattern ^\h*RUNASUSER=ntp
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            No matching system items were found.
            Criterion: Ensure package name equals 'ntp' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_2.1.4.3_Ensure_ntp_is_running_as_user_ntp"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.861-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/8/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/1"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident system="URL">http://www.ntp.org/</xccdf:ident>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AU-8</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:check system="http://open-scap.org/page/SCE"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                            value-id="xccdf_org.cisecurity.benchmarks_value_3994906_var"/>
                        <xccdf:check-content-ref href="sce/nix_service_owned_by_user_chk.sh"/>
                        <xccdf:check-content>
                           <command_result href="sce/nix_service_owned_by_user_chk.sh"
                                           xccdf="fail"
                                           script="/root/Assessor/sce/nix_service_owned_by_user_chk.sh"
                                           exit-value="102">
                              <out>
                                 <l>- Start check - systemd service process is owned by user</l>
                                 <l>- FAIL!</l>
                                 <l>- systemd service: "" with PID: ""  is owned by user: ""</l>
                                 <l>- End check - systemd service process is owned by user</l>
                              </out>
                              <err/>
                              <env/>
                           </command_result>
                        </xccdf:check-content>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="sce">
                              <table class="evidence-sep" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Script:</td>
                                       <td>sce/nix_service_owned_by_user_chk.sh</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Result:</td>
                                       <td class="fail">Fail</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Exit Value:</td>
                                       <td>102</td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Output:</td>
                                       <td>
                                          <ul class="unstyled">
                                             <li>- Start check - systemd service process is owned by user</li>
                                             <li>- FAIL!</li>
                                             <li>- systemd service: "" with PID: ""  is owned by user: ""</li>
                                             <li>- End check - systemd service process is owned by user</li>
                                          </ul>
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td>No error lines were collected.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </evidence>
                     </xccdf:check>
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994908"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994908">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994908"
                                      check="all"
                                      check_existence="at_least_one_exists">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure at least one file named /etc/init.d/ntp exists and matches pattern ^\h*RUNASUSER=ntp</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>At Least One Exists</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="fail">Fail</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994910"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994910">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994910"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'ntp' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: http://www.ntp.org/
            • URL: NIST SP 800-53 Rev. 5: AU-8

            CIS Controls V7.0:

            • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
              CIS Control Information
              Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
              Subcontrol: 6.1
              Label: Utilize Three Synchronized Time Sources
              Description: Use at least three synchronized time sources from which all servers and network devices retrieve time information on a regular basis so that timestamps in logs are consistent.
            • >

            CIS Critical Security Controls V8.0:

            • Control 8: Audit Log Management: -- More
              CIS Control Information
              Control: Collect, alert, review, and retain audit logs of events that could help detect, understand, or recover from an attack.
              Safeguard: 8.4
              Label: Standardize Time Synchronization
              Description: Standardize time synchronization. Configure at least two synchronized time sources across enterprise assets, where supported.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Pass

            2.1.4.4 Ensure ntp is enabled and running

            Description:

            ntp is a daemon for synchronizing the system clock across the network

            ntp needs to be enabled and running in order to synchronize the system to a timeserver.

            Time synchronization is important to support time sensitive security mechanisms and to ensure log files have consistent time records across the enterprise to aid in forensic investigations

            IFntp is in use on the system, run the following commands:

            Run the following command to unmask ntp.service :

            # systemctl unmask ntp.service

            Run the following command to enable and start ntp.service :

            # systemctl --now enable ntp.service

            OR

            If another time synchronization service is in use on the system, run the following command to remove ntp :

            # apt purge ntp

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Criterion: Ensure systemd 'ntp.service' unit 'UnitFileState' property equals 'enabled'
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            Systemdunitproperty Item
            Name Type Status Value
            Unit String Exists ntp.service
            Property String Exists UnitFileState
            Value String Exists No Value
            Criterion: Ensure systemd 'ntp.service' unit 'ActiveState' property equals 'active'
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            Systemdunitproperty Item
            Name Type Status Value
            Unit String Exists ntp.service
            Property String Exists ActiveState
            Value String Exists inactive
            Criterion: Ensure package name equals 'ntp' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_2.1.4.4_Ensure_ntp_is_enabled_and_running"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.861-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/1"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/8/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AU-8</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-export export-name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3994911"
                                            value-id="xccdf_org.cisecurity.benchmarks_value_3994911_var"/>
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994911"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994911">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994911"
                                      check="all"
                                      check_existence="at_least_one_exists">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure systemd 'ntp.service' unit 'UnitFileState' property equals 'enabled'</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>At Least One Exists</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="fail">Fail</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <caption>Systemdunitproperty Item</caption>
                                       <thead>
                                          <tr>
                                             <th scope="col">Name</th>
                                             <th scope="col">Type</th>
                                             <th scope="col">Status</th>
                                             <th scope="col">Value</th>
                                          </tr>
                                       </thead>
                                       <tbody class="tbe">
                                          <tr>
                                             <td>Unit</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>ntp.service</td>
                                          </tr>
                                          <tr>
                                             <td>Property</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>UnitFileState</td>
                                          </tr>
                                          <tr class="evaluated">
                                             <td>Value</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>No Value</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-export export-name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3994913"
                                            value-id="xccdf_org.cisecurity.benchmarks_value_3994913_var"/>
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994913"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994913">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994913"
                                      check="all"
                                      check_existence="at_least_one_exists">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure systemd 'ntp.service' unit 'ActiveState' property equals 'active'</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>At Least One Exists</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="fail">Fail</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <caption>Systemdunitproperty Item</caption>
                                       <thead>
                                          <tr>
                                             <th scope="col">Name</th>
                                             <th scope="col">Type</th>
                                             <th scope="col">Status</th>
                                             <th scope="col">Value</th>
                                          </tr>
                                       </thead>
                                       <tbody class="tbe">
                                          <tr>
                                             <td>Unit</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>ntp.service</td>
                                          </tr>
                                          <tr>
                                             <td>Property</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>ActiveState</td>
                                          </tr>
                                          <tr class="evaluated">
                                             <td>Value</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>inactive</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994915"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994915">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994915"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'ntp' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: AU-8

            CIS Controls V7.0:

            • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
              CIS Control Information
              Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
              Subcontrol: 6.1
              Label: Utilize Three Synchronized Time Sources
              Description: Use at least three synchronized time sources from which all servers and network devices retrieve time information on a regular basis so that timestamps in logs are consistent.
            • >

            CIS Critical Security Controls V8.0:

            • Control 8: Audit Log Management: -- More
              CIS Control Information
              Control: Collect, alert, review, and retain audit logs of events that could help detect, understand, or recover from an attack.
              Safeguard: 8.4
              Label: Standardize Time Synchronization
              Description: Standardize time synchronization. Configure at least two synchronized time sources across enterprise assets, where supported.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            2.2 Special Purpose Services

            This section describes services that are installed on systems that specifically need to run these services. If any of these services are not required, it is recommended that they be deleted from the system to reduce the potential attack surface. If a package is required as a dependency, and the service is not required, the service should be stopped and masked.

            The following command can be used to stop and mask the service:

            # systemctl --now mask <service_name>
            Pass

            2.2.2 Ensure Avahi Server is not installed

            Description:

            Avahi is a free zeroconf implementation, including a system for multicast DNS/DNS-SD service discovery. Avahi allows programs to publish and discover services and hosts running on a local network with no specific configuration. For example, a user can plug a computer into a network and Avahi automatically finds printers to print to, files to look at and people to talk to, as well as network services running on the machine.

            Automatic discovery of network services is not normally required for system functionality. It is recommended to remove this package to reduce the potential attack surface.

            Run the following commands to remove avahi-daemon :

            # systemctl stop avahi-daaemon.service

            # systemctl stop avahi-daemon.socket

            # apt purge avahi-daemon

            Show Assessment Evidence
            Complex Check
            AND
            Criterion: Ensure package name equals 'avahi-daemon' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_2.2.2_Ensure_Avahi_Server_is_not_installed"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.861-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: SI-4</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994923"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994923">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994923"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'avahi-daemon' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: SI-4

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.2
              Label: Ensure Only Approved Ports, Protocols and Services Are Running
              Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Pass

            2.2.3 Ensure CUPS is not installed

            Description:

            The Common Unix Print System (CUPS) provides the ability to print to both local and network printers. A system running CUPS can also accept print jobs from remote systems and print them to local printers. It also provides a web based remote administration capability.

            If the system does not need to print jobs or accept print jobs from other systems, it is recommended that CUPS be removed to reduce the potential attack surface.

            Run one of the following commands to remove cups :

            # apt purge cups

            Impact:

            Removing CUPS will prevent printing from the system, a common task for workstation systems.

            Show Assessment Evidence
            Complex Check
            AND
            Criterion: Ensure package name equals 'cups' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_2.2.3_Ensure_CUPS_is_not_installed"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.861-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">More detailed documentation on CUPS is available at the project homepage at http://www.cups.org.</xccdf:ident>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-7</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994926"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994926">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994926"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'cups' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: More detailed documentation on CUPS is available at the project homepage at http://www.cups.org.
            • URL: NIST SP 800-53 Rev. 5: CM-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.2
              Label: Ensure Only Approved Ports, Protocols and Services Are Running
              Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Pass

            2.2.4 Ensure DHCP Server is not installed

            Description:

            The Dynamic Host Configuration Protocol (DHCP) is a service that allows machines to be dynamically assigned IP addresses.

            Unless a system is specifically set up to act as a DHCP server, it is recommended that this package be removed to reduce the potential attack surface.

            Run the following command to remove isc-dhcp-server :

            # apt purge isc-dhcp-server

            Show Assessment Evidence
            Complex Check
            AND
            Criterion: Ensure package name equals 'isc-dhcp-server' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_2.2.4_Ensure_DHCP_Server_is_not_installed"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.861-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">More detailed documentation on DHCP is available at http://www.isc.org/software/dhcp.</xccdf:ident>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-7</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994928"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994928">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994928"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'isc-dhcp-server' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: More detailed documentation on DHCP is available at http://www.isc.org/software/dhcp.
            • URL: NIST SP 800-53 Rev. 5: CM-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.2
              Label: Ensure Only Approved Ports, Protocols and Services Are Running
              Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Pass

            2.2.5 Ensure LDAP server is not installed

            Description:

            The Lightweight Directory Access Protocol (LDAP) was introduced as a replacement for NIS/YP. It is a service that provides a method for looking up information from a central database.

            If the system will not need to act as an LDAP server, it is recommended that the software be removed to reduce the potential attack surface.

            Run one of the following commands to remove slapd :

            # apt purge slapd

            Show Assessment Evidence
            Complex Check
            AND
            Criterion: Ensure package name equals 'slapd' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_2.2.5_Ensure_LDAP_server_is_not_installed"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.861-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">For more detailed documentation on OpenLDAP, go to the project homepage at http://www.openldap.org.</xccdf:ident>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-7</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994931"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994931">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994931"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'slapd' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: For more detailed documentation on OpenLDAP, go to the project homepage at http://www.openldap.org.
            • URL: NIST SP 800-53 Rev. 5: CM-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.2
              Label: Ensure Only Approved Ports, Protocols and Services Are Running
              Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Pass

            2.2.6 Ensure NFS is not installed

            Description:

            The Network File System (NFS) is one of the first and most widely distributed file systems in the UNIX environment. It provides the ability for systems to mount file systems of other servers through the network.

            If the system does not export NFS shares, it is recommended that the nfs-kernel-server package be removed to reduce the remote attack surface.

            Run the following command to remove nfs :

            # apt purge nfs-kernel-server

            Show Assessment Evidence
            Complex Check
            AND
            Criterion: Ensure package name equals 'nfs-kernel-server' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_2.2.6_Ensure_NFS_is_not_installed"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.861-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-7</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994934"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994934">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994934"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'nfs-kernel-server' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.2
              Label: Ensure Only Approved Ports, Protocols and Services Are Running
              Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Pass

            2.2.7 Ensure DNS Server is not installed

            Description:

            The Domain Name System (DNS) is a hierarchical naming system that maps names to IP addresses for computers, services and other resources connected to a network.

            Unless a system is specifically designated to act as a DNS server, it is recommended that the package be deleted to reduce the potential attack surface.

            Run the following commands to disable DNS server :

            # apt purge bind9

            Show Assessment Evidence
            Complex Check
            AND
            Criterion: Ensure package name equals 'bind9' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_2.2.7_Ensure_DNS_Server_is_not_installed"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.861-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-7</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994937"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994937">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994937"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'bind9' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.2
              Label: Ensure Only Approved Ports, Protocols and Services Are Running
              Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Pass

            2.2.8 Ensure FTP Server is not installed

            Description:

            The File Transfer Protocol (FTP) provides networked computers with the ability to transfer files.

            FTP does not protect the confidentiality of data or authentication credentials. It is recommended SFTP be used if file transfer is required. Unless there is a need to run the system as a FTP server (for example, to allow anonymous downloads), it is recommended that the package be deleted to reduce the potential attack surface.

            Run the following command to remove vsftpd :

            # apt purge vsftpd

            Show Assessment Evidence
            Complex Check
            AND
            Criterion: Ensure package name equals 'vsftpd' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_2.2.8_Ensure_FTP_Server_is_not_installed"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.861-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-7</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994940"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994940">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994940"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'vsftpd' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.2
              Label: Ensure Only Approved Ports, Protocols and Services Are Running
              Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Fail

            2.2.9 Ensure HTTP server is not installed

            Description:

            HTTP or web servers provide the ability to host web site content.

            Unless there is a need to run the system as a web server, it is recommended that the package be deleted to reduce the potential attack surface.

            Run the following command to remove apache2 :

            # apt purge apache2

            Show Assessment Evidence
            Complex Check
            AND
            Criterion: Ensure package name equals 'apache2' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Fail
            Dpkginfo Item
            Name Type Status Value
            Name String Exists apache2
            Arch String Exists amd64
            Epoch String Exists (none)
            Release String Exists 4ubuntu3.15
            Version String Exists 2.4.41
            Evr Evr String Exists 0:2.4.41-4ubuntu3.15


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_2.2.9_Ensure_HTTP_server_is_not_installed"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.861-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-7</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994941"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994941">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994941"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'apache2' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Dpkginfo Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Name</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>apache2</td>
                                       </tr>
                                       <tr>
                                          <td>Arch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>amd64</td>
                                       </tr>
                                       <tr>
                                          <td>Epoch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>(none)</td>
                                       </tr>
                                       <tr>
                                          <td>Release</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>4ubuntu3.15</td>
                                       </tr>
                                       <tr>
                                          <td>Version</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>2.4.41</td>
                                       </tr>
                                       <tr>
                                          <td>Evr</td>
                                          <td>Evr String</td>
                                          <td>Exists</td>
                                          <td>0:2.4.41-4ubuntu3.15</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.2
              Label: Ensure Only Approved Ports, Protocols and Services Are Running
              Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Pass

            2.2.10 Ensure IMAP and POP3 server are not installed

            Description:

            dovecot-imapd and dovecot-pop3d are an open source IMAP and POP3 server for Linux based systems.

            Unless POP3 and/or IMAP servers are to be provided by this system, it is recommended that the package be removed to reduce the potential attack surface.

            Run one of the following commands to remove dovecot-imapd and dovecot-pop3d :

            # apt purge dovecot-imapd dovecot-pop3d

            Show Assessment Evidence
            Complex Check
            AND
            Criterion: Ensure package name equals 'dovecot-imapd' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensure package name equals 'dovecot-pop3d' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_2.2.10_Ensure_IMAP_and_POP3_server_are_not_installed"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.862-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-7</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994945"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994945">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994945"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'dovecot-imapd' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994947"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994947">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994947"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'dovecot-pop3d' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.2
              Label: Ensure Only Approved Ports, Protocols and Services Are Running
              Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Pass

            2.2.11 Ensure Samba is not installed

            Description:

            The Samba daemon allows system administrators to configure their Linux systems to share file systems and directories with Windows desktops. Samba will advertise the file systems and directories via the Server Message Block (SMB) protocol. Windows desktop users will be able to mount these directories and file systems as letter drives on their systems.

            If there is no need to mount directories and file systems to Windows systems, then this service should be deleted to reduce the potential attack surface.

            Run the following command to remove samba :

            # apt purge samba

            Show Assessment Evidence
            Complex Check
            AND
            Criterion: Ensure package name equals 'samba' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_2.2.11_Ensure_Samba_is_not_installed"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.862-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-6, CM-7</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994948"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994948">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994948"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'samba' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-6, CM-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.2
              Label: Ensure Only Approved Ports, Protocols and Services Are Running
              Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Pass

            2.2.12 Ensure HTTP Proxy Server is not installed

            Description:

            Squid is a standard proxy server used in many distributions and environments.

            If there is no need for a proxy server, it is recommended that the squid proxy be deleted to reduce the potential attack surface.

            Run the following command to remove squid :

            # apt purge squid

            Show Assessment Evidence
            Complex Check
            AND
            Criterion: Ensure package name equals 'squid' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_2.2.12_Ensure_HTTP_Proxy_Server_is_not_installed"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.862-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-6, CM-7</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994951"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994951">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994951"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'squid' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-6, CM-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.2
              Label: Ensure Only Approved Ports, Protocols and Services Are Running
              Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Pass

            2.2.13 Ensure SNMP Server is not installed

            Description:

            Simple Network Management Protocol (SNMP) is a widely used protocol for monitoring the health and welfare of network equipment, computer equipment and devices like UPSs.

            Net-SNMP is a suite of applications used to implement SNMPv1 (RFC 1157), SNMPv2 (RFCs 1901-1908), and SNMPv3 (RFCs 3411-3418) using both IPv4 and IPv6.

            Support for SNMPv2 classic (a.k.a. "SNMPv2 historic" - RFCs 1441-1452) was dropped with the 4.0 release of the UCD-snmp package.

            The Simple Network Management Protocol (SNMP) server is used to listen for SNMP commands from an SNMP management system, execute the commands or collect the information and then send results back to the requesting system.

            The SNMP server can communicate using SNMPv1 , which transmits data in the clear and does not require authentication to execute commands. SNMPv3 replaces the simple/clear text password sharing used in SNMPv2 with more securely encoded parameters. If the the SNMP service is not required, the snmpd package should be removed to reduce the attack surface of the system.

            Note: If SNMP is required:

            • The server should be configured for SNMP v3 only. User Authentication and Message Encryption should be configured.
            • If SNMP v2 is absolutely necessary, modify the community strings' values.

            Run the following command to remove snmpd :

            # apt purge snmpd

            Show Assessment Evidence
            Complex Check
            AND
            Criterion: Ensure package name equals 'snmpd' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_2.2.13_Ensure_SNMP_Server_is_not_installed"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.862-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-7</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994955"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994955">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994955"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'snmpd' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.2
              Label: Ensure Only Approved Ports, Protocols and Services Are Running
              Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Pass

            2.2.14 Ensure NIS Server is not installed

            Description:

            The Network Information Service (NIS) (formally known as Yellow Pages) is a client-server directory service protocol for distributing system configuration files. The NIS server is a collection of programs that allow for the distribution of configuration files.

            The NIS service is inherently an insecure system that has been vulnerable to DOS attacks, buffer overflows and has poor authentication for querying NIS maps. NIS generally has been replaced by such protocols as Lightweight Directory Access Protocol (LDAP). It is recommended that the service be removed and other, more secure services be used

            Run the following command to remove nis :

            # apt purge nis

            Show Assessment Evidence
            Complex Check
            AND
            Criterion: Ensure package name equals 'nis' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_2.2.14_Ensure_NIS_Server_is_not_installed"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.862-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-6, CM-7</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994957"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994957">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994957"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'nis' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-6, CM-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.2
              Label: Ensure Only Approved Ports, Protocols and Services Are Running
              Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Pass

            2.2.15 Ensure dnsmasq is not installed

            Description:

            dnsmasq is a lightweight tool that provides DNS caching, DNS forwarding and DHCP (Dynamic Host Configuration Protocol) services.

            Unless a system is specifically designated to act as a DNS caching, DNS forwarding and/or DHCP server, it is recommended that the package be removed to reduce the potential attack surface.

            Run the following command to remove dnsmasq :

            # apt purge dnsmasq

            Show Assessment Evidence
            Complex Check
            AND
            Criterion: Ensure package name equals 'dnsmasq' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_2.2.15_Ensure_dnsmasq_is_not_installed"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.862-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-7</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994960"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994960">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994960"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'dnsmasq' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.2
              Label: Ensure Only Approved Ports, Protocols and Services Are Running
              Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Pass

            2.2.16 Ensure mail transfer agent is configured for local-only mode

            Description:

            Mail Transfer Agents (MTA), such as sendmail and Postfix, are used to listen for incoming mail and transfer the messages to the appropriate user or mail server. If the system is not intended to be a mail server, it is recommended that the MTA be configured to only process local mail.

            The software for all Mail Transfer Agents is complex and most have a long history of security issues. While it is important to ensure that the system can process local mail messages, it is not necessary to have the MTA's daemon listening on a port unless the server is intended to be a mail server that receives and processes mail from other systems.

            Note:

            • This recommendation is designed around the postfix mail server.
            • Depending on your environment you may have an alternative MTA installed such as exim4. If this is the case consult the documentation for your installed MTA to configure the recommended state.

            Edit /etc/postfix/main.cf and add the following line to the RECEIVING MAIL section. If the line already exists, change it to look like the line below:

            inet_interfaces = loopback-only

            Run the following command to restart postfix :

            # systemctl restart postfix

            Show Assessment Evidence
            Complex Check
            AND
            Criterion: Linux Custom Object "No Servers Listening On Port 25"
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_2.2.16_Ensure_mail_transfer_agent_is_configured_for_local-only_mode"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.862-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-7</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994965"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994965">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994965"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Linux Custom Object "No Servers Listening On Port 25"</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.2
              Label: Ensure Only Approved Ports, Protocols and Services Are Running
              Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Pass

            2.2.17 Ensure rsync service is either not installed or is masked

            Description:

            The rsync service can be used to synchronize files between systems over network links.

            The rsync service presents a security risk as the rsync protocol is unencrypted. The rsync package should be removed or if required for dependencies, the rsync service should be stopped and masked to reduce the attack area of the system.

            Run the following command to remove rsync :

            # apt purge rsync

            -- OR --

            Run the following commands to stop and mask rsync :

            # systemctl stop rsync



            # systemctl mask rsync

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Criterion: Ensure systemd 'rsync.service' unit 'ActiveState' property equals 'inactive'
            Existence Check: At Least One Exists
            Item Check: All
            Result: Pass
            Systemdunitproperty Item
            Name Type Status Value
            Unit String Exists rsync.service
            Property String Exists ActiveState
            Value String Exists inactive
            Criterion: Ensure systemd 'rsync.service' unit 'UnitFileState' property equals 'masked'
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            Systemdunitproperty Item
            Name Type Status Value
            Unit String Exists rsync.service
            Property String Exists UnitFileState
            Value String Exists No Value
            Criterion: Ensure package name equals 'rsync' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_2.2.17_Ensure_rsync_service_is_either_not_installed_or_is_masked"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.862-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-6, CM-7</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-export export-name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3994969"
                                            value-id="xccdf_org.cisecurity.benchmarks_value_3994969_var"/>
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994969"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994969">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994969"
                                      check="all"
                                      check_existence="at_least_one_exists">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure systemd 'rsync.service' unit 'ActiveState' property equals 'inactive'</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>At Least One Exists</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <caption>Systemdunitproperty Item</caption>
                                       <thead>
                                          <tr>
                                             <th scope="col">Name</th>
                                             <th scope="col">Type</th>
                                             <th scope="col">Status</th>
                                             <th scope="col">Value</th>
                                          </tr>
                                       </thead>
                                       <tbody class="tbe">
                                          <tr>
                                             <td>Unit</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>rsync.service</td>
                                          </tr>
                                          <tr>
                                             <td>Property</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>ActiveState</td>
                                          </tr>
                                          <tr class="evaluated">
                                             <td>Value</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>inactive</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-export export-name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3994972"
                                            value-id="xccdf_org.cisecurity.benchmarks_value_3994972_var"/>
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994972"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994972">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994972"
                                      check="all"
                                      check_existence="at_least_one_exists">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure systemd 'rsync.service' unit 'UnitFileState' property equals 'masked'</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>At Least One Exists</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="fail">Fail</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <caption>Systemdunitproperty Item</caption>
                                       <thead>
                                          <tr>
                                             <th scope="col">Name</th>
                                             <th scope="col">Type</th>
                                             <th scope="col">Status</th>
                                             <th scope="col">Value</th>
                                          </tr>
                                       </thead>
                                       <tbody class="tbe">
                                          <tr>
                                             <td>Unit</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>rsync.service</td>
                                          </tr>
                                          <tr>
                                             <td>Property</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>UnitFileState</td>
                                          </tr>
                                          <tr class="evaluated">
                                             <td>Value</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>No Value</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994967"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994967">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994967"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'rsync' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-6, CM-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.2
              Label: Ensure Only Approved Ports, Protocols and Services Are Running
              Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            2.3 Service Clients

            A number of insecure services exist. While disabling the servers prevents a local attack against these services, it is advised to remove their clients unless they are required.

            Note: This should not be considered a comprehensive list of insecure service clients. You may wish to consider additions to those listed here for your environment.

            Pass

            2.3.1 Ensure NIS Client is not installed

            Description:

            The Network Information Service (NIS), formerly known as Yellow Pages, is a client-server directory service protocol used to distribute system configuration files. The NIS client was used to bind a machine to an NIS server and receive the distributed configuration files.

            The NIS service is inherently an insecure system that has been vulnerable to DOS attacks, buffer overflows and has poor authentication for querying NIS maps. NIS generally has been replaced by such protocols as Lightweight Directory Access Protocol (LDAP). It is recommended that the service be removed.

            Uninstall nis :

            # apt purge nis

            Impact:

            Many insecure service clients are used as troubleshooting tools and in testing environments. Uninstalling them can inhibit capability to test and troubleshoot. If they are required it is advisable to remove the clients after use to prevent accidental or intentional misuse.

            Show Assessment Evidence
            Complex Check
            AND
            Criterion: Ensure package name equals 'nis' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_2.3.1_Ensure_NIS_Client_is_not_installed"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.862-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/2/subcontrol/6"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-7, CM-11</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994976"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994976">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994976"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'nis' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-7, CM-11

            CIS Controls V7.0:

            • Control 2: Inventory and Control of Software Assets: -- More
              CIS Control Information
              Control: Actively manage (inventory, track, and correct) all software on the network so that only authorized software is installed and can execute, and that all unauthorized and unmanaged software is found and prevented from installation or execution.
              Subcontrol: 2.6
              Label: Address unapproved software
              Description: Ensure that unauthorized software is either removed or the inventory is updated in a timely manner
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Pass

            2.3.2 Ensure rsh client is not installed

            Description:

            The rsh-client package contains the client commands for the rsh services.

            These legacy clients contain numerous security exposures and have been replaced with the more secure SSH package. Even if the server is removed, it is best to ensure the clients are also removed to prevent users from inadvertently attempting to use these commands and therefore exposing their credentials. Note that removing the rsh-client package removes the clients for rsh , rcp and rlogin .

            Uninstall rsh :

            # apt purge rsh-client

            Impact:

            Many insecure service clients are used as troubleshooting tools and in testing environments. Uninstalling them can inhibit capability to test and troubleshoot. If they are required it is advisable to remove the clients after use to prevent accidental or intentional misuse.

            Show Assessment Evidence
            Complex Check
            AND
            Criterion: Ensure package name equals 'rsh-client' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_2.3.2_Ensure_rsh_client_is_not_installed"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.862-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-7</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994979"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994979">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994979"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'rsh-client' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.2
              Label: Ensure Only Approved Ports, Protocols and Services Are Running
              Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Pass

            2.3.3 Ensure talk client is not installed

            Description:

            The talk software makes it possible for users to send and receive messages across systems through a terminal session. The talk client, which allows initialization of talk sessions, is installed by default.

            The software presents a security risk as it uses unencrypted protocols for communication.

            Uninstall talk :

            # apt purge talk

            Impact:

            Many insecure service clients are used as troubleshooting tools and in testing environments. Uninstalling them can inhibit capability to test and troubleshoot. If they are required it is advisable to remove the clients after use to prevent accidental or intentional misuse.

            Show Assessment Evidence
            Complex Check
            AND
            Criterion: Ensure package name equals 'talk' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_2.3.3_Ensure_talk_client_is_not_installed"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.862-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-7</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994982"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994982">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994982"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'talk' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.2
              Label: Ensure Only Approved Ports, Protocols and Services Are Running
              Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Fail

            2.3.4 Ensure telnet client is not installed

            Description:

            The telnet package contains the telnet client, which allows users to start connections to other systems via the telnet protocol.

            The telnet protocol is insecure and unencrypted. The use of an unencrypted transmission medium could allow an unauthorized user to steal credentials. The ssh package provides an encrypted session and stronger security and is included in most Linux distributions.

            Uninstall telnet :

            # apt purge telnet

            Impact:

            Many insecure service clients are used as troubleshooting tools and in testing environments. Uninstalling them can inhibit capability to test and troubleshoot. If they are required it is advisable to remove the clients after use to prevent accidental or intentional misuse.

            Show Assessment Evidence
            Complex Check
            AND
            Criterion: Ensure package name equals 'telnet' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Fail
            Dpkginfo Item
            Name Type Status Value
            Name String Exists telnet
            Arch String Exists amd64
            Epoch String Exists (none)
            Release String Exists 41.2build1
            Version String Exists 0.17
            Evr Evr String Exists 0:0.17-41.2build1


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_2.3.4_Ensure_telnet_client_is_not_installed"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.862-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-7, CM-11</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994985"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994985">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994985"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'telnet' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Dpkginfo Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Name</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>telnet</td>
                                       </tr>
                                       <tr>
                                          <td>Arch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>amd64</td>
                                       </tr>
                                       <tr>
                                          <td>Epoch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>(none)</td>
                                       </tr>
                                       <tr>
                                          <td>Release</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>41.2build1</td>
                                       </tr>
                                       <tr>
                                          <td>Version</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>0.17</td>
                                       </tr>
                                       <tr>
                                          <td>Evr</td>
                                          <td>Evr String</td>
                                          <td>Exists</td>
                                          <td>0:0.17-41.2build1</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-7, CM-11

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.2
              Label: Ensure Only Approved Ports, Protocols and Services Are Running
              Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Pass

            2.3.5 Ensure LDAP client is not installed

            Description:

            The Lightweight Directory Access Protocol (LDAP) was introduced as a replacement for NIS/YP. It is a service that provides a method for looking up information from a central database.

            If the system will not need to act as an LDAP client, it is recommended that the software be removed to reduce the potential attack surface.

            Uninstall ldap-utils :

            # apt purge ldap-utils

            Impact:

            Removing the LDAP client will prevent or inhibit using LDAP for authentication in your environment.

            Show Assessment Evidence
            Complex Check
            AND
            Criterion: Ensure package name equals 'ldap-utils' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_2.3.5_Ensure_LDAP_client_is_not_installed"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.862-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-7</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994988"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994988">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994988"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'ldap-utils' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.2
              Label: Ensure Only Approved Ports, Protocols and Services Are Running
              Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Pass

            2.3.6 Ensure RPC is not installed

            Description:

            Remote Procedure Call (RPC) is a method for creating low level client server applications across different system architectures. It requires an RPC compliant client listening on a network port. The supporting package is rpcbind."

            If RPC is not required, it is recommended that this services be removed to reduce the remote attack surface.

            Run the following command to remove rpcbind :

            # apt purge rpcbind

            Show Assessment Evidence
            Complex Check
            AND
            Criterion: Ensure package name equals 'rpcbind' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_2.3.6_Ensure__RPC_is_not_installed"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.862-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-7</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994993"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994993">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994993"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'rpcbind' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.2
              Label: Ensure Only Approved Ports, Protocols and Services Are Running
              Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Manual

            2.4 Ensure nonessential services are removed or masked

            Description:

            A network port is identified by its number, the associated IP address, and the type of the communication protocol such as TCP or UDP.

            A listening port is a network port on which an application or process listens on, acting as a communication endpoint.

            Each listening port can be open or closed (filtered) using a firewall. In general terms, an open port is a network port that accepts incoming packets from remote locations.

            Services listening on the system pose a potential risk as an attack vector. These services should be reviewed, and if not required, the service should be stopped, and the package containing the service should be removed. If required packages have a dependency, the service should be stopped and masked to reduce the attack surface of the system.

            Run the following command to remove the package containing the service:

            # apt purge <package_name>

            OR If required packages have a dependency:

            Run the following commands to stop and mask the service:

            # systemctl stop <service_name>.socket

            # systemctl stop <service_name>.service

            # systemctl mask <service_name>.socket

            # systemctl mask <service_name>.service



            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_2.4_Ensure_nonessential_services_are_removed_or_masked"
                               role="unscored"
                               severity="unknown"
                               time="2024-04-14T23:46:23.862-04:00"
                               version="1"
                               weight="0.0">
               <xccdf:result>notchecked</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-7</xccdf:ident>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.2
              Label: Ensure Only Approved Ports, Protocols and Services Are Running
              Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            3 Network Configuration

            This section provides guidance on for securing the network configuration of the system through kernel parameters, access list control, and firewall settings.

            Note:

            • sysctl settings are defined through files in /usr/lib/sysctl.d/ , /run/sysctl.d/ , and /etc/sysctl.d/ .
            • Files must have the " .conf " extension.
            • Vendors settings live in /usr/lib/sysctl.d/
            • To override a whole file, create a new file with the same name in /etc/sysctl.d/ and put new settings there.
            • To override only specific settings, add a file with a lexically later name in /etc/sysctl.d/ and put new settings there.
            • The paths where sysctl preload files usually exist
              • /run/sysctl.d/*.conf
              • /etc/sysctl.d/*.conf
              • /usr/local/lib/sysctl.d/*.conf
              • /usr/lib/sysctl.d/*.conf
              • /lib/sysctl.d/*.conf
              • /etc/sysctl.conf
            • On systems with Uncomplicated Firewall, additional settings may be configured in /etc/ufw/sysctl.conf
              • The settings in /etc/ufw/sysctl.conf will override settings in /etc/sysctl.conf
              • This behavior can be changed by updating the IPT_SYSCTL parameter in /etc/default/ufw

            3.1 Disable unused network protocols and devices

            To reduce the attack surface of a system, unused network protocols and devices should be disabled.

            The Linux kernel modules support several network protocols that are not commonly used. If these protocols are not needed, it is recommended that they be disabled in the kernel.

            Note: This should not be considered a comprehensive list of uncommon network protocols, you may wish to consider additions to those listed here for your environment.

            Manual

            3.1.1 Ensure IPv6 status is identified

            Description:

            Internet Protocol Version 6 (IPv6) is the most recent version of Internet Protocol (IP). It's designed to supply IP addressing and additional security to support the predicted growth of connected devices. IPv6 is based on 128-bit addressing and can support 340 undecillion addresses, which is 340 followed by 36 zeroes.

            Features of IPv6

            • Hierarchical addressing and routing infrastructure
            • Stateful and Stateless configuration
            • Support for quality of service (QoS)
            • An ideal protocol for neighboring node interaction

            IETF RFC 4038 recommends that applications are built with an assumption of dual stack. It is recommended that IPv6 be enabled and configured in accordance with Benchmark recommendations.

            If dual stack and IPv6 are not used in your environment, IPv6 may be disabled to reduce the attack surface of the system, and recommendations pertaining to IPv6 can be skipped.

            Note: It is recommended that IPv6 be enabled and configured unless this is against local site policy

            Enable or disable IPv6 in accordance with system requirements and local site policy

            Impact:

            IETF RFC 4038 recommends that applications are built with an assumption of dual stack.

            When enabled, IPv6 will require additional configuration to reduce risk to the system.

            Show Assessment Evidence
            Complex Check
            AND
            Script: sce/nix_ipv6_disabled_chk.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Results:
            • ** Fail **
            • - IPv6 is enabled on the system
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.1.1_Ensure_IPv6_status_is_identified"
                               role="unscored"
                               severity="unknown"
                               time="2024-04-14T23:46:23.863-04:00"
                               version="1"
                               weight="0.0">
               <xccdf:result>informational</xccdf:result>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-7</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/nix_ipv6_disabled_chk.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/nix_ipv6_disabled_chk.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/nix_ipv6_disabled_chk.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Results:</l>
                              <l> ** Fail **</l>
                              <l> - IPv6 is enabled on the system</l>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/nix_ipv6_disabled_chk.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Results:</li>
                                          <li> ** Fail **</li>
                                          <li> - IPv6 is enabled on the system</li>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.2
              Label: Ensure Only Approved Ports, Protocols and Services Are Running
              Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Pass

            3.1.2 Ensure wireless interfaces are disabled

            Description:

            Wireless networking is used when wired networks are unavailable. Debian contains a wireless tool kit to allow system administrators to configure and use wireless networks.

            If wireless is not to be used, wireless devices can be disabled to reduce the potential attack surface.

            Run the following script to disable any wireless interfaces:

            #!/usr/bin/env bash



            {

            module_fix()

            {

            if ! modprobe -n -v "$l_mname" | grep -P -- '^\h*install \/bin\/(true|false)'; then

            echo -e " - setting module: \"$l_mname\" to be un-loadable"

            echo -e "install $l_mname /bin/false" >> /etc/modprobe.d/"$l_mname".conf

            fi

            if lsmod | grep "$l_mname" > /dev/null 2>&1; then

            echo -e " - unloading module \"$l_mname\""

            modprobe -r "$l_mname"

            fi

            if ! grep -Pq -- "^\h*blacklist\h+$l_mname\b" /etc/modprobe.d/*; then

            echo -e " - deny listing \"$l_mname\""

            echo -e "blacklist $l_mname" >> /etc/modprobe.d/"$l_mname".conf

            fi

            }

            if [ -n "$(find /sys/class/net/*/ -type d -name wireless)" ]; then

            l_dname=$(for driverdir in $(find /sys/class/net/*/ -type d -name wireless | xargs -0 dirname); do basename "$(readlink -f "$driverdir"/device/driver/module)";done | sort -u)

            for l_mname in $l_dname; do

            module_fix

            done

            fi

            }

            Impact:

            Many if not all laptop workstations and some desktop workstations will connect via wireless requiring these interfaces be enabled.

            Show Assessment Evidence
            Complex Check
            AND
            Script: sce/nix_wireless_chk.sh
            Result: Pass
            Exit Value: 101
            Output:
            • - Audit Result:
            • ** PASS **
            • - System has no wireless NICs installed
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.1.2_Ensure_wireless_interfaces_are_disabled"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.863-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/15/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/15/subcontrol/5"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-7</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/nix_wireless_chk.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/nix_wireless_chk.sh"
                                        xccdf="pass"
                                        script="/root/Assessor/sce/nix_wireless_chk.sh"
                                        exit-value="101">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** PASS **</l>
                              <l/>
                              <l> - System has no wireless NICs installed</l>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/nix_wireless_chk.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="pass">Pass</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>101</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** PASS **</li>
                                          <li/>
                                          <li> - System has no wireless NICs installed</li>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-7

            CIS Controls V7.0:

            • Control 15: Wireless Access Control: -- More
              CIS Control Information
              Control: The processes and tools used to track/control/prevent/correct the security use of wireless local area networks (WLANs), access points, and wireless client systems.
              Subcontrol: 15.4
              Label: Disable Wireless Access on Devices if Not Required
              Description: Disable wireless access on devices that do not have a business purpose for wireless access.
            • Control 15: Wireless Access Control: -- More
              CIS Control Information
              Control: The processes and tools used to track/control/prevent/correct the security use of wireless local area networks (WLANs), access points, and wireless client systems.
              Subcontrol: 15.5
              Label: Limit Wireless Access on Client Devices
              Description: Configure wireless access on client machines that do have an essential wireless business purpose, to allow access only to authorized wireless networks and to restrict access to other wireless networks.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Pass

            3.1.3 Ensure bluetooth is disabled

            Description:

            Bluetooth is a short-range wireless technology standard that is used for exchanging data between devices over short distances. It employs UHF radio waves in the ISM bands, from 2.402 GHz to 2.48 GHz. It is mainly used as an alternative to wire connections.

            An attacker may be able to find a way to access or corrupt your data. One example of this type of activity is bluesnarfing , which refers to attackers using a Bluetooth connection to steal information off of your Bluetooth device. Also, viruses or other malicious code can take advantage of Bluetooth technology to infect other devices. If you are infected, your data may be corrupted, compromised, stolen, or lost.

            Run the following commands to stop and mask the Bluetooth service

            # systemctl stop bluetooth.service

            # systemctl mask bluetooth.service

            Note: A reboot may be required

            Impact:

            Many personal electronic devices (PEDs) use Bluetooth technology. For example, you may be able to operate your computer with a wireless keyboard. Disabling Bluetooth will prevent these devices from connecting to the system.

            Show Assessment Evidence
            Complex Check
            AND
            Criterion: Ensure systemd 'bluetooth.service' unit 'UnitFileState' property not equal 'enabled'
            Existence Check: At Least One Exists
            Item Check: All
            Result: Pass
            Systemdunitproperty Item
            Name Type Status Value
            Unit String Exists bluetooth.service
            Property String Exists UnitFileState
            Value String Exists No Value
            Criterion: Ensure systemd 'bluetooth.service' unit 'ActiveState' property not equal 'active'
            Existence Check: At Least One Exists
            Item Check: All
            Result: Pass
            Systemdunitproperty Item
            Name Type Status Value
            Unit String Exists bluetooth.service
            Property String Exists ActiveState
            Value String Exists inactive


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.1.3_Ensure_bluetooth_is_disabled"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.863-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident system="URL">https://www.cisa.gov/tips/st05-015</xccdf:ident>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-7</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-export export-name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3995087"
                                         value-id="xccdf_org.cisecurity.benchmarks_value_3995087_var"/>
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995087"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995087">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995087"
                                   check="all"
                                   check_existence="at_least_one_exists">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure systemd 'bluetooth.service' unit 'UnitFileState' property not equal 'enabled'</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>At Least One Exists</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Systemdunitproperty Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Unit</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>bluetooth.service</td>
                                       </tr>
                                       <tr>
                                          <td>Property</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>UnitFileState</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Value</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>No Value</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-export export-name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3995090"
                                         value-id="xccdf_org.cisecurity.benchmarks_value_3995090_var"/>
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995090"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995090">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995090"
                                   check="all"
                                   check_existence="at_least_one_exists">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure systemd 'bluetooth.service' unit 'ActiveState' property not equal 'active'</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>At Least One Exists</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Systemdunitproperty Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Unit</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>bluetooth.service</td>
                                       </tr>
                                       <tr>
                                          <td>Property</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>ActiveState</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Value</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>inactive</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: https://www.cisa.gov/tips/st05-015
            • URL: NIST SP 800-53 Rev. 5: CM-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.2
              Label: Ensure Only Approved Ports, Protocols and Services Are Running
              Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            3.2 Network Parameters (Host Only)

            The following network parameters are intended for use if the system is to act as a host only. A system is considered host only if the system has a single interface, or has multiple interfaces but will not be configured as a router.

            Note:

            Configuration files are read from directories in /etc/ , /run/ , /usr/local/lib/ , and /lib/ , in order of precedence. Files must have the the ".conf" extension. extension. Files in /etc/ override files with the same name in /run/ , /usr/local/lib/ , and /lib/ . Files in /run/ override files with the same name under /usr/ .

            All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Thus, the configuration in a certain file may either be replaced completely (by placing a file with the same name in a directory with higher priority), or individual settings might be changed (by specifying additional settings in a file with a different name that is ordered later).

            Packages should install their configuration files in /usr/lib/ (distribution packages) or /usr/local/lib/ (local installs). Files in /etc/ are reserved for the local administrator, who may use this logic to override the configuration files installed by vendor packages. It is recommended to prefix all filenames with a two-digit number and a dash, to simplify the ordering of the files.

            If the administrator wants to disable a configuration file supplied by the vendor, the recommended way is to place a symlink to /dev/null in the configuration directory in /etc/ , with the same filename as the vendor configuration file. If the vendor configuration file is included in the initrd image, the image has to be regenerated.

            Fail

            3.2.1 Ensure packet redirect sending is disabled

            Description:

            ICMP Redirects are used to send routing information to other hosts. As a host itself does not act as a router (in a host only configuration), there is no need to send redirects.

            An attacker could use a compromised host to send invalid ICMP redirects to other router devices in an attempt to corrupt routing and have users access a system set up by the attacker as opposed to a valid system.

            Set the following parameters in /etc/sysctl.conf or a file in /etc/sysctl.d/ ending in .conf :

            • net.ipv4.conf.all.send_redirects = 0
            • net.ipv4.conf.default.send_redirects = 0

            Example:

            # printf "

            net.ipv4.conf.all.send_redirects = 0

            net.ipv4.conf.default.send_redirects = 0

            " >> /etc/sysctl.d/60-netipv4_sysctl.conf

            Run the following command to set the active kernel parameters:

            # {

            sysctl -w net.ipv4.conf.all.send_redirects=0

            sysctl -w net.ipv4.conf.default.send_redirects=0

            sysctl -w net.ipv4.route.flush=1

            }

            Note: If these settings appear in a conically later file, or later in the same file, these settings will be overwritten

            Show Assessment Evidence
            Complex Check
            AND
            Script: sce/nix_kernel_parameter_chk_v2.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - "net.ipv4.conf.all.send_redirects" is not set in an included file
            • ** Note: "net.ipv4.conf.all.send_redirects" May be set in a file that's ignored by load procedure **
            • - Correctly set:
            • - "net.ipv4.conf.all.send_redirects" is correctly set to "0" in the running configuration
            No error lines were collected.
            Script: sce/nix_kernel_parameter_chk_v2.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - "net.ipv4.conf.default.send_redirects" is not set in an included file
            • ** Note: "net.ipv4.conf.default.send_redirects" May be set in a file that's ignored by load procedure **
            • - Correctly set:
            • - "net.ipv4.conf.default.send_redirects" is correctly set to "0" in the running configuration
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.2.1_Ensure_packet_redirect_sending_is_disabled"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.863-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                         value-id="xccdf_org.cisecurity.benchmarks_value_3995116_var"/>
                     <xccdf:check-content-ref href="sce/nix_kernel_parameter_chk_v2.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/nix_kernel_parameter_chk_v2.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/nix_kernel_parameter_chk_v2.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** FAIL **</l>
                              <l> - Reason(s) for audit failure:</l>
                              <l/>
                              <l> - "net.ipv4.conf.all.send_redirects" is not set in an included file</l>
                              <l>   ** Note: "net.ipv4.conf.all.send_redirects" May be set in a file that's ignored by load procedure **</l>
                              <l/>
                              <l/>
                              <l/>
                              <l>- Correctly set:</l>
                              <l/>
                              <l> - "net.ipv4.conf.all.send_redirects" is correctly set to "0" in the running configuration</l>
                              <l/>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/nix_kernel_parameter_chk_v2.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** FAIL **</li>
                                          <li> - Reason(s) for audit failure:</li>
                                          <li/>
                                          <li> - "net.ipv4.conf.all.send_redirects" is not set in an included file</li>
                                          <li>   ** Note: "net.ipv4.conf.all.send_redirects" May be set in a file that's ignored by load procedure **</li>
                                          <li/>
                                          <li/>
                                          <li/>
                                          <li>- Correctly set:</li>
                                          <li/>
                                          <li> - "net.ipv4.conf.all.send_redirects" is correctly set to "0" in the running configuration</li>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                         value-id="xccdf_org.cisecurity.benchmarks_value_3995120_var"/>
                     <xccdf:check-content-ref href="sce/nix_kernel_parameter_chk_v2.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/nix_kernel_parameter_chk_v2.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/nix_kernel_parameter_chk_v2.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** FAIL **</l>
                              <l> - Reason(s) for audit failure:</l>
                              <l/>
                              <l> - "net.ipv4.conf.default.send_redirects" is not set in an included file</l>
                              <l>   ** Note: "net.ipv4.conf.default.send_redirects" May be set in a file that's ignored by load procedure **</l>
                              <l/>
                              <l/>
                              <l/>
                              <l>- Correctly set:</l>
                              <l/>
                              <l> - "net.ipv4.conf.default.send_redirects" is correctly set to "0" in the running configuration</l>
                              <l/>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/nix_kernel_parameter_chk_v2.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** FAIL **</li>
                                          <li> - Reason(s) for audit failure:</li>
                                          <li/>
                                          <li> - "net.ipv4.conf.default.send_redirects" is not set in an included file</li>
                                          <li>   ** Note: "net.ipv4.conf.default.send_redirects" May be set in a file that's ignored by load procedure **</li>
                                          <li/>
                                          <li/>
                                          <li/>
                                          <li>- Correctly set:</li>
                                          <li/>
                                          <li> - "net.ipv4.conf.default.send_redirects" is correctly set to "0" in the running configuration</li>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.2
              Label: Ensure Only Approved Ports, Protocols and Services Are Running
              Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Fail

            3.2.2 Ensure IP forwarding is disabled

            Description:

            The net.ipv4.ip_forward and net.ipv6.conf.all.forwarding flags are used to tell the system whether it can forward packets or not.

            Setting net.ipv4.ip_forward and net.ipv6.conf.all.forwarding to 0 ensures that a system with multiple interfaces (for example, a hard proxy), will never be able to forward packets, and therefore, never serve as a router.

            Set the following parameter in /etc/sysctl.conf or a file in /etc/sysctl.d/ ending in .conf :

            • net.ipv4.ip_forward = 0

            Example:

            # printf "

            net.ipv4.ip_forward = 0

            " >> /etc/sysctl.d/60-netipv4_sysctl.conf

            Run the following command to set the active kernel parameters:

            # {

            sysctl -w net.ipv4.ip_forward=0

            sysctl -w net.ipv4.route.flush=1

            }

            -IF- IPv6 is enabled on the system:

            Set the following parameter in /etc/sysctl.conf or a file in /etc/sysctl.d/ ending in .conf :

            • net.ipv6.conf.all.forwarding = 0

            Example:

            # printf "

            net.ipv6.conf.all.forwarding = 0

            " >> /etc/sysctl.d/60-netipv6_sysctl.conf

            Run the following command to set the active kernel parameters:

            # {

            sysctl -w net.ipv6.conf.all.forwarding=0

            sysctl -w net.ipv6.route.flush=1

            }

            Note: If these settings appear in a conically later file, or later in the same file, these settings will be overwritten

            Show Assessment Evidence
            Complex Check
            AND
            Script: sce/nix_kernel_parameter_chk_v2.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - "net.ipv4.ip_forward" is incorrectly set to "1" in the running configuration and should have a value of: "0"
            • - "net.ipv4.ip_forward" is incorrectly set to "1" in "/etc/sysctl.d/k8s.conf" and should have a value of: "0"
            No error lines were collected.
            Script: sce/nix_kernel_parameter_chk_v2.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - "net.ipv6.conf.all.forwarding" is not set in an included file
            • ** Note: "net.ipv6.conf.all.forwarding" May be set in a file that's ignored by load procedure **
            • - Correctly set:
            • - "net.ipv6.conf.all.forwarding" is correctly set to "0" in the running configuration
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.2.2_Ensure_IP_forwarding_is_disabled"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.863-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                         value-id="xccdf_org.cisecurity.benchmarks_value_3995127_var"/>
                     <xccdf:check-content-ref href="sce/nix_kernel_parameter_chk_v2.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/nix_kernel_parameter_chk_v2.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/nix_kernel_parameter_chk_v2.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** FAIL **</l>
                              <l> - Reason(s) for audit failure:</l>
                              <l/>
                              <l> - "net.ipv4.ip_forward" is incorrectly set to "1" in the running configuration and should have a value of: "0"</l>
                              <l> - "net.ipv4.ip_forward" is incorrectly set to "1" in "/etc/sysctl.d/k8s.conf" and should have a value of: "0"</l>
                              <l/>
                              <l/>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/nix_kernel_parameter_chk_v2.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** FAIL **</li>
                                          <li> - Reason(s) for audit failure:</li>
                                          <li/>
                                          <li> - "net.ipv4.ip_forward" is incorrectly set to "1" in the running configuration and should have a value of: "0"</li>
                                          <li> - "net.ipv4.ip_forward" is incorrectly set to "1" in "/etc/sysctl.d/k8s.conf" and should have a value of: "0"</li>
                                          <li/>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                         value-id="xccdf_org.cisecurity.benchmarks_value_3995131_var"/>
                     <xccdf:check-content-ref href="sce/nix_kernel_parameter_chk_v2.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/nix_kernel_parameter_chk_v2.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/nix_kernel_parameter_chk_v2.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** FAIL **</l>
                              <l> - Reason(s) for audit failure:</l>
                              <l/>
                              <l> - "net.ipv6.conf.all.forwarding" is not set in an included file</l>
                              <l>   ** Note: "net.ipv6.conf.all.forwarding" May be set in a file that's ignored by load procedure **</l>
                              <l/>
                              <l/>
                              <l/>
                              <l>- Correctly set:</l>
                              <l/>
                              <l> - "net.ipv6.conf.all.forwarding" is correctly set to "0" in the running configuration</l>
                              <l/>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/nix_kernel_parameter_chk_v2.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** FAIL **</li>
                                          <li> - Reason(s) for audit failure:</li>
                                          <li/>
                                          <li> - "net.ipv6.conf.all.forwarding" is not set in an included file</li>
                                          <li>   ** Note: "net.ipv6.conf.all.forwarding" May be set in a file that's ignored by load procedure **</li>
                                          <li/>
                                          <li/>
                                          <li/>
                                          <li>- Correctly set:</li>
                                          <li/>
                                          <li> - "net.ipv6.conf.all.forwarding" is correctly set to "0" in the running configuration</li>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.2
              Label: Ensure Only Approved Ports, Protocols and Services Are Running
              Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            3.3 Network Parameters (Host and Router)

            The following network parameters are intended for use on both host only and router systems. A system acts as a router if it has at least two interfaces and is configured to perform routing functions.

            Note:

            Configuration files are read from directories in /etc/ , /run/ , /usr/local/lib/ , and /lib/ , in order of precedence. Files must have the the ".conf" extension. extension. Files in /etc/ override files with the same name in /run/ , /usr/local/lib/ , and /lib/ . Files in /run/ override files with the same name under /usr/ .

            All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Thus, the configuration in a certain file may either be replaced completely (by placing a file with the same name in a directory with higher priority), or individual settings might be changed (by specifying additional settings in a file with a different name that is ordered later).

            Packages should install their configuration files in /usr/lib/ (distribution packages) or /usr/local/lib/ (local installs). Files in /etc/ are reserved for the local administrator, who may use this logic to override the configuration files installed by vendor packages. It is recommended to prefix all filenames with a two-digit number and a dash, to simplify the ordering of the files.

            If the administrator wants to disable a configuration file supplied by the vendor, the recommended way is to place a symlink to /dev/null in the configuration directory in /etc/ , with the same filename as the vendor configuration file. If the vendor configuration file is included in the initrd image, the image has to be regenerated.

            Fail

            3.3.1 Ensure source routed packets are not accepted

            Description:

            In networking, source routing allows a sender to partially or fully specify the route packets take through a network. In contrast, non-source routed packets travel a path determined by routers in the network. In some cases, systems may not be routable or reachable from some locations (e.g. private addresses vs. Internet routable), and so source routed packets would need to be used.

            Setting net.ipv4.conf.all.accept_source_route , net.ipv4.conf.default.accept_source_route , net.ipv6.conf.all.accept_source_route and net.ipv6.conf.default.accept_source_route to 0 disables the system from accepting source routed packets. Assume this system was capable of routing packets to Internet routable addresses on one interface and private addresses on another interface. Assume that the private addresses were not routable to the Internet routable addresses and vice versa. Under normal routing circumstances, an attacker from the Internet routable addresses could not use the system as a way to reach the private address systems. If, however, source routed packets were allowed, they could be used to gain access to the private address systems as the route could be specified, rather than rely on routing protocols that did not allow this routing.

            Set the following parameters in /etc/sysctl.conf or a file in /etc/sysctl.d/ ending in .conf :

            • net.ipv4.conf.all.accept_source_route = 0
            • net.ipv4.conf.default.accept_source_route = 0

            Example:

            # printf "

            net.ipv4.conf.all.accept_source_route = 0

            net.ipv4.conf.default.accept_source_route = 0

            " >> /etc/sysctl.d/60-netipv4_sysctl.conf

            Run the following command to set the active kernel parameters:

            # {

            sysctl -w net.ipv4.conf.all.accept_source_route=0

            sysctl -w net.ipv4.conf.default.accept_source_route=0

            sysctl -w net.ipv4.route.flush=1

            }

            -IF- IPv6 is enabled on the system:

            Set the following parameters in /etc/sysctl.conf or a file in /etc/sysctl.d/ ending in .conf :

            • net.ipv6.conf.all.accept_source_route = 0
            • net.ipv6.conf.default.accept_source_route = 0

            Example:

            # printf "

            net.ipv6.conf.all.accept_source_route = 0

            net.ipv6.conf.default.accept_source_route = 0

            " >> /etc/sysctl.d/60-netipv6_sysctl.conf

            Run the following command to set the active kernel parameters:

            # {

            sysctl -w net.ipv6.conf.all.accept_source_route=0

            sysctl -w net.ipv6.conf.default.accept_source_route=0

            sysctl -w net.ipv6.route.flush=1

            }

            Note: If these settings appear in a conically later file, or later in the same file, these settings will be overwritten

            Show Assessment Evidence
            Complex Check
            AND
            Complex Check
            AND
            Complex Check
            AND
            Script: sce/nix_kernel_parameter_chk_v2.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - "net.ipv4.conf.all.accept_source_route" is not set in an included file
            • ** Note: "net.ipv4.conf.all.accept_source_route" May be set in a file that's ignored by load procedure **
            • - Correctly set:
            • - "net.ipv4.conf.all.accept_source_route" is correctly set to "0" in the running configuration
            No error lines were collected.
            Script: sce/nix_kernel_parameter_chk_v2.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - "net.ipv4.conf.default.accept_source_route" is not set in an included file
            • ** Note: "net.ipv4.conf.default.accept_source_route" May be set in a file that's ignored by load procedure **
            • - Correctly set:
            • - "net.ipv4.conf.default.accept_source_route" is correctly set to "0" in the running configuration
            No error lines were collected.
            Script: sce/nix_kernel_parameter_chk_v2.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - "net.ipv6.conf.all.accept_source_route" is not set in an included file
            • ** Note: "net.ipv6.conf.all.accept_source_route" May be set in a file that's ignored by load procedure **
            • - Correctly set:
            • - "net.ipv6.conf.all.accept_source_route" is correctly set to "0" in the running configuration
            No error lines were collected.
            Script: sce/nix_kernel_parameter_chk_v2.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - "net.ipv6.conf.default.accept_source_route" is not set in an included file
            • ** Note: "net.ipv6.conf.default.accept_source_route" May be set in a file that's ignored by load procedure **
            • - Correctly set:
            • - "net.ipv6.conf.default.accept_source_route" is correctly set to "0" in the running configuration
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.3.1_Ensure_source_routed_packets_are_not_accepted"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.863-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:complex-check operator="AND" negate="false">
                        <xccdf:check system="http://open-scap.org/page/SCE"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                               value-id="xccdf_org.cisecurity.benchmarks_value_3995139_var"/>
                           <xccdf:check-content-ref href="sce/nix_kernel_parameter_chk_v2.sh"/>
                           <xccdf:check-content>
                              <command_result href="sce/nix_kernel_parameter_chk_v2.sh"
                                              xccdf="fail"
                                              script="/root/Assessor/sce/nix_kernel_parameter_chk_v2.sh"
                                              exit-value="102">
                                 <out>
                                    <l/>
                                    <l>- Audit Result:</l>
                                    <l>  ** FAIL **</l>
                                    <l> - Reason(s) for audit failure:</l>
                                    <l/>
                                    <l> - "net.ipv4.conf.all.accept_source_route" is not set in an included file</l>
                                    <l>   ** Note: "net.ipv4.conf.all.accept_source_route" May be set in a file that's ignored by load procedure **</l>
                                    <l/>
                                    <l/>
                                    <l/>
                                    <l>- Correctly set:</l>
                                    <l/>
                                    <l> - "net.ipv4.conf.all.accept_source_route" is correctly set to "0" in the running configuration</l>
                                    <l/>
                                 </out>
                                 <err/>
                                 <env/>
                              </command_result>
                           </xccdf:check-content>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="sce">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Script:</td>
                                          <td>sce/nix_kernel_parameter_chk_v2.sh</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Exit Value:</td>
                                          <td>102</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Output:</td>
                                          <td>
                                             <ul class="unstyled">
                                                <li/>
                                                <li>- Audit Result:</li>
                                                <li>  ** FAIL **</li>
                                                <li> - Reason(s) for audit failure:</li>
                                                <li/>
                                                <li> - "net.ipv4.conf.all.accept_source_route" is not set in an included file</li>
                                                <li>   ** Note: "net.ipv4.conf.all.accept_source_route" May be set in a file that's ignored by load procedure **</li>
                                                <li/>
                                                <li/>
                                                <li/>
                                                <li>- Correctly set:</li>
                                                <li/>
                                                <li> - "net.ipv4.conf.all.accept_source_route" is correctly set to "0" in the running configuration</li>
                                                <li/>
                                             </ul>
                                          </td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td>No error lines were collected.</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </evidence>
                        </xccdf:check>
                        <xccdf:check system="http://open-scap.org/page/SCE"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                               value-id="xccdf_org.cisecurity.benchmarks_value_3995143_var"/>
                           <xccdf:check-content-ref href="sce/nix_kernel_parameter_chk_v2.sh"/>
                           <xccdf:check-content>
                              <command_result href="sce/nix_kernel_parameter_chk_v2.sh"
                                              xccdf="fail"
                                              script="/root/Assessor/sce/nix_kernel_parameter_chk_v2.sh"
                                              exit-value="102">
                                 <out>
                                    <l/>
                                    <l>- Audit Result:</l>
                                    <l>  ** FAIL **</l>
                                    <l> - Reason(s) for audit failure:</l>
                                    <l/>
                                    <l> - "net.ipv4.conf.default.accept_source_route" is not set in an included file</l>
                                    <l>   ** Note: "net.ipv4.conf.default.accept_source_route" May be set in a file that's ignored by load procedure **</l>
                                    <l/>
                                    <l/>
                                    <l/>
                                    <l>- Correctly set:</l>
                                    <l/>
                                    <l> - "net.ipv4.conf.default.accept_source_route" is correctly set to "0" in the running configuration</l>
                                    <l/>
                                 </out>
                                 <err/>
                                 <env/>
                              </command_result>
                           </xccdf:check-content>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="sce">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Script:</td>
                                          <td>sce/nix_kernel_parameter_chk_v2.sh</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Exit Value:</td>
                                          <td>102</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Output:</td>
                                          <td>
                                             <ul class="unstyled">
                                                <li/>
                                                <li>- Audit Result:</li>
                                                <li>  ** FAIL **</li>
                                                <li> - Reason(s) for audit failure:</li>
                                                <li/>
                                                <li> - "net.ipv4.conf.default.accept_source_route" is not set in an included file</li>
                                                <li>   ** Note: "net.ipv4.conf.default.accept_source_route" May be set in a file that's ignored by load procedure **</li>
                                                <li/>
                                                <li/>
                                                <li/>
                                                <li>- Correctly set:</li>
                                                <li/>
                                                <li> - "net.ipv4.conf.default.accept_source_route" is correctly set to "0" in the running configuration</li>
                                                <li/>
                                             </ul>
                                          </td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td>No error lines were collected.</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </evidence>
                        </xccdf:check>
                     </xccdf:complex-check>
                     <xccdf:check system="http://open-scap.org/page/SCE"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                            value-id="xccdf_org.cisecurity.benchmarks_value_3995148_var"/>
                        <xccdf:check-content-ref href="sce/nix_kernel_parameter_chk_v2.sh"/>
                        <xccdf:check-content>
                           <command_result href="sce/nix_kernel_parameter_chk_v2.sh"
                                           xccdf="fail"
                                           script="/root/Assessor/sce/nix_kernel_parameter_chk_v2.sh"
                                           exit-value="102">
                              <out>
                                 <l/>
                                 <l>- Audit Result:</l>
                                 <l>  ** FAIL **</l>
                                 <l> - Reason(s) for audit failure:</l>
                                 <l/>
                                 <l> - "net.ipv6.conf.all.accept_source_route" is not set in an included file</l>
                                 <l>   ** Note: "net.ipv6.conf.all.accept_source_route" May be set in a file that's ignored by load procedure **</l>
                                 <l/>
                                 <l/>
                                 <l/>
                                 <l>- Correctly set:</l>
                                 <l/>
                                 <l> - "net.ipv6.conf.all.accept_source_route" is correctly set to "0" in the running configuration</l>
                                 <l/>
                              </out>
                              <err/>
                              <env/>
                           </command_result>
                        </xccdf:check-content>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="sce">
                              <table class="evidence-sep" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Script:</td>
                                       <td>sce/nix_kernel_parameter_chk_v2.sh</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Result:</td>
                                       <td class="fail">Fail</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Exit Value:</td>
                                       <td>102</td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Output:</td>
                                       <td>
                                          <ul class="unstyled">
                                             <li/>
                                             <li>- Audit Result:</li>
                                             <li>  ** FAIL **</li>
                                             <li> - Reason(s) for audit failure:</li>
                                             <li/>
                                             <li> - "net.ipv6.conf.all.accept_source_route" is not set in an included file</li>
                                             <li>   ** Note: "net.ipv6.conf.all.accept_source_route" May be set in a file that's ignored by load procedure **</li>
                                             <li/>
                                             <li/>
                                             <li/>
                                             <li>- Correctly set:</li>
                                             <li/>
                                             <li> - "net.ipv6.conf.all.accept_source_route" is correctly set to "0" in the running configuration</li>
                                             <li/>
                                          </ul>
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td>No error lines were collected.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                         value-id="xccdf_org.cisecurity.benchmarks_value_3995152_var"/>
                     <xccdf:check-content-ref href="sce/nix_kernel_parameter_chk_v2.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/nix_kernel_parameter_chk_v2.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/nix_kernel_parameter_chk_v2.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** FAIL **</l>
                              <l> - Reason(s) for audit failure:</l>
                              <l/>
                              <l> - "net.ipv6.conf.default.accept_source_route" is not set in an included file</l>
                              <l>   ** Note: "net.ipv6.conf.default.accept_source_route" May be set in a file that's ignored by load procedure **</l>
                              <l/>
                              <l/>
                              <l/>
                              <l>- Correctly set:</l>
                              <l/>
                              <l> - "net.ipv6.conf.default.accept_source_route" is correctly set to "0" in the running configuration</l>
                              <l/>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/nix_kernel_parameter_chk_v2.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** FAIL **</li>
                                          <li> - Reason(s) for audit failure:</li>
                                          <li/>
                                          <li> - "net.ipv6.conf.default.accept_source_route" is not set in an included file</li>
                                          <li>   ** Note: "net.ipv6.conf.default.accept_source_route" May be set in a file that's ignored by load procedure **</li>
                                          <li/>
                                          <li/>
                                          <li/>
                                          <li>- Correctly set:</li>
                                          <li/>
                                          <li> - "net.ipv6.conf.default.accept_source_route" is correctly set to "0" in the running configuration</li>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.2
              Label: Ensure Only Approved Ports, Protocols and Services Are Running
              Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Fail

            3.3.2 Ensure ICMP redirects are not accepted

            Description:

            ICMP redirect messages are packets that convey routing information and tell your host (acting as a router) to send packets via an alternate path. It is a way of allowing an outside routing device to update your system routing tables.

            ICMP redirect messages are packets that convey routing information and tell your host (acting as a router) to send packets via an alternate path. It is a way of allowing an outside routing device to update your system routing tables. By setting net.ipv4.conf.all.accept_redirects , net.ipv4.conf.default.accept_redirects , net.ipv6.conf.all.accept_redirects , and net.ipv6.conf.default.accept_redirects to 0 , the system will not accept any ICMP redirect messages, and therefore, won't allow outsiders to update the system's routing tables.

            Set the following parameters in /etc/sysctl.conf or a file in /etc/sysctl.d/ ending in .conf :

            • net.ipv4.conf.all.accept_redirects = 0
            • net.ipv4.conf.default.accept_redirects = 0

            Example:

            # printf "

            net.ipv4.conf.all.accept_redirects = 0

            net.ipv4.conf.default.accept_redirects = 0

            " >> /etc/sysctl.d/60-netipv4_sysctl.conf

            Run the following command to set the active kernel parameters:

            # {

            sysctl -w net.ipv4.conf.all.accept_redirects=0

            sysctl -w net.ipv4.conf.default.accept_redirects=0

            sysctl -w net.ipv4.route.flush=1

            }

            -IF- IPv6 is enabled on the system:

            Set the following parameters in /etc/sysctl.conf or a file in /etc/sysctl.d/ ending in .conf :

            • net.ipv6.conf.all.accept_redirects = 0
            • net.ipv6.conf.default.accept_redirects = 0

            Example:

            # printf "

            net.ipv6.conf.all.accept_redirects = 0

            net.ipv6.conf.default.accept_redirects = 0

            " >> /etc/sysctl.d/60-netipv6_sysctl.conf

            Run the following command to set the active kernel parameters:

            # {

            sysctl -w net.ipv6.conf.all.accept_redirects=0

            sysctl -w net.ipv6.conf.default.accept_redirects=0

            sysctl -w net.ipv6.route.flush=1

            }

            Note: If these settings appear in a conically later file, or later in the same file, these settings will be overwritten

            Show Assessment Evidence
            Complex Check
            AND
            Complex Check
            AND
            Complex Check
            AND
            Script: sce/nix_kernel_parameter_chk_v2.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - "net.ipv4.conf.all.accept_redirects" is not set in an included file
            • ** Note: "net.ipv4.conf.all.accept_redirects" May be set in a file that's ignored by load procedure **
            • - Correctly set:
            • - "net.ipv4.conf.all.accept_redirects" is correctly set to "0" in the running configuration
            No error lines were collected.
            Script: sce/nix_kernel_parameter_chk_v2.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - "net.ipv4.conf.default.accept_redirects" is not set in an included file
            • ** Note: "net.ipv4.conf.default.accept_redirects" May be set in a file that's ignored by load procedure **
            • - Correctly set:
            • - "net.ipv4.conf.default.accept_redirects" is correctly set to "0" in the running configuration
            No error lines were collected.
            Script: sce/nix_kernel_parameter_chk_v2.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - "net.ipv6.conf.all.accept_redirects" is incorrectly set to "1" in the running configuration and should have a value of: "0"
            • - "net.ipv6.conf.all.accept_redirects" is not set in an included file
            • ** Note: "net.ipv6.conf.all.accept_redirects" May be set in a file that's ignored by load procedure **
            No error lines were collected.
            Script: sce/nix_kernel_parameter_chk_v2.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - "net.ipv6.conf.default.accept_redirects" is incorrectly set to "1" in the running configuration and should have a value of: "0"
            • - "net.ipv6.conf.default.accept_redirects" is not set in an included file
            • ** Note: "net.ipv6.conf.default.accept_redirects" May be set in a file that's ignored by load procedure **
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.3.2_Ensure_ICMP_redirects_are_not_accepted"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.863-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:complex-check operator="AND" negate="false">
                        <xccdf:check system="http://open-scap.org/page/SCE"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                               value-id="xccdf_org.cisecurity.benchmarks_value_3995159_var"/>
                           <xccdf:check-content-ref href="sce/nix_kernel_parameter_chk_v2.sh"/>
                           <xccdf:check-content>
                              <command_result href="sce/nix_kernel_parameter_chk_v2.sh"
                                              xccdf="fail"
                                              script="/root/Assessor/sce/nix_kernel_parameter_chk_v2.sh"
                                              exit-value="102">
                                 <out>
                                    <l/>
                                    <l>- Audit Result:</l>
                                    <l>  ** FAIL **</l>
                                    <l> - Reason(s) for audit failure:</l>
                                    <l/>
                                    <l> - "net.ipv4.conf.all.accept_redirects" is not set in an included file</l>
                                    <l>   ** Note: "net.ipv4.conf.all.accept_redirects" May be set in a file that's ignored by load procedure **</l>
                                    <l/>
                                    <l/>
                                    <l/>
                                    <l>- Correctly set:</l>
                                    <l/>
                                    <l> - "net.ipv4.conf.all.accept_redirects" is correctly set to "0" in the running configuration</l>
                                    <l/>
                                 </out>
                                 <err/>
                                 <env/>
                              </command_result>
                           </xccdf:check-content>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="sce">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Script:</td>
                                          <td>sce/nix_kernel_parameter_chk_v2.sh</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Exit Value:</td>
                                          <td>102</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Output:</td>
                                          <td>
                                             <ul class="unstyled">
                                                <li/>
                                                <li>- Audit Result:</li>
                                                <li>  ** FAIL **</li>
                                                <li> - Reason(s) for audit failure:</li>
                                                <li/>
                                                <li> - "net.ipv4.conf.all.accept_redirects" is not set in an included file</li>
                                                <li>   ** Note: "net.ipv4.conf.all.accept_redirects" May be set in a file that's ignored by load procedure **</li>
                                                <li/>
                                                <li/>
                                                <li/>
                                                <li>- Correctly set:</li>
                                                <li/>
                                                <li> - "net.ipv4.conf.all.accept_redirects" is correctly set to "0" in the running configuration</li>
                                                <li/>
                                             </ul>
                                          </td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td>No error lines were collected.</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </evidence>
                        </xccdf:check>
                        <xccdf:check system="http://open-scap.org/page/SCE"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                               value-id="xccdf_org.cisecurity.benchmarks_value_3995164_var"/>
                           <xccdf:check-content-ref href="sce/nix_kernel_parameter_chk_v2.sh"/>
                           <xccdf:check-content>
                              <command_result href="sce/nix_kernel_parameter_chk_v2.sh"
                                              xccdf="fail"
                                              script="/root/Assessor/sce/nix_kernel_parameter_chk_v2.sh"
                                              exit-value="102">
                                 <out>
                                    <l/>
                                    <l>- Audit Result:</l>
                                    <l>  ** FAIL **</l>
                                    <l> - Reason(s) for audit failure:</l>
                                    <l/>
                                    <l> - "net.ipv4.conf.default.accept_redirects" is not set in an included file</l>
                                    <l>   ** Note: "net.ipv4.conf.default.accept_redirects" May be set in a file that's ignored by load procedure **</l>
                                    <l/>
                                    <l/>
                                    <l/>
                                    <l>- Correctly set:</l>
                                    <l/>
                                    <l> - "net.ipv4.conf.default.accept_redirects" is correctly set to "0" in the running configuration</l>
                                    <l/>
                                 </out>
                                 <err/>
                                 <env/>
                              </command_result>
                           </xccdf:check-content>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="sce">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Script:</td>
                                          <td>sce/nix_kernel_parameter_chk_v2.sh</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Exit Value:</td>
                                          <td>102</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Output:</td>
                                          <td>
                                             <ul class="unstyled">
                                                <li/>
                                                <li>- Audit Result:</li>
                                                <li>  ** FAIL **</li>
                                                <li> - Reason(s) for audit failure:</li>
                                                <li/>
                                                <li> - "net.ipv4.conf.default.accept_redirects" is not set in an included file</li>
                                                <li>   ** Note: "net.ipv4.conf.default.accept_redirects" May be set in a file that's ignored by load procedure **</li>
                                                <li/>
                                                <li/>
                                                <li/>
                                                <li>- Correctly set:</li>
                                                <li/>
                                                <li> - "net.ipv4.conf.default.accept_redirects" is correctly set to "0" in the running configuration</li>
                                                <li/>
                                             </ul>
                                          </td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td>No error lines were collected.</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </evidence>
                        </xccdf:check>
                     </xccdf:complex-check>
                     <xccdf:check system="http://open-scap.org/page/SCE"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                            value-id="xccdf_org.cisecurity.benchmarks_value_3995168_var"/>
                        <xccdf:check-content-ref href="sce/nix_kernel_parameter_chk_v2.sh"/>
                        <xccdf:check-content>
                           <command_result href="sce/nix_kernel_parameter_chk_v2.sh"
                                           xccdf="fail"
                                           script="/root/Assessor/sce/nix_kernel_parameter_chk_v2.sh"
                                           exit-value="102">
                              <out>
                                 <l/>
                                 <l>- Audit Result:</l>
                                 <l>  ** FAIL **</l>
                                 <l> - Reason(s) for audit failure:</l>
                                 <l/>
                                 <l> - "net.ipv6.conf.all.accept_redirects" is incorrectly set to "1" in the running configuration and should have a value of: "0"</l>
                                 <l> - "net.ipv6.conf.all.accept_redirects" is not set in an included file</l>
                                 <l>   ** Note: "net.ipv6.conf.all.accept_redirects" May be set in a file that's ignored by load procedure **</l>
                                 <l/>
                                 <l/>
                              </out>
                              <err/>
                              <env/>
                           </command_result>
                        </xccdf:check-content>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="sce">
                              <table class="evidence-sep" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Script:</td>
                                       <td>sce/nix_kernel_parameter_chk_v2.sh</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Result:</td>
                                       <td class="fail">Fail</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Exit Value:</td>
                                       <td>102</td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Output:</td>
                                       <td>
                                          <ul class="unstyled">
                                             <li/>
                                             <li>- Audit Result:</li>
                                             <li>  ** FAIL **</li>
                                             <li> - Reason(s) for audit failure:</li>
                                             <li/>
                                             <li> - "net.ipv6.conf.all.accept_redirects" is incorrectly set to "1" in the running configuration and should have a value of: "0"</li>
                                             <li> - "net.ipv6.conf.all.accept_redirects" is not set in an included file</li>
                                             <li>   ** Note: "net.ipv6.conf.all.accept_redirects" May be set in a file that's ignored by load procedure **</li>
                                             <li/>
                                             <li/>
                                          </ul>
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td>No error lines were collected.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                         value-id="xccdf_org.cisecurity.benchmarks_value_3995172_var"/>
                     <xccdf:check-content-ref href="sce/nix_kernel_parameter_chk_v2.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/nix_kernel_parameter_chk_v2.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/nix_kernel_parameter_chk_v2.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** FAIL **</l>
                              <l> - Reason(s) for audit failure:</l>
                              <l/>
                              <l> - "net.ipv6.conf.default.accept_redirects" is incorrectly set to "1" in the running configuration and should have a value of: "0"</l>
                              <l> - "net.ipv6.conf.default.accept_redirects" is not set in an included file</l>
                              <l>   ** Note: "net.ipv6.conf.default.accept_redirects" May be set in a file that's ignored by load procedure **</l>
                              <l/>
                              <l/>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/nix_kernel_parameter_chk_v2.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** FAIL **</li>
                                          <li> - Reason(s) for audit failure:</li>
                                          <li/>
                                          <li> - "net.ipv6.conf.default.accept_redirects" is incorrectly set to "1" in the running configuration and should have a value of: "0"</li>
                                          <li> - "net.ipv6.conf.default.accept_redirects" is not set in an included file</li>
                                          <li>   ** Note: "net.ipv6.conf.default.accept_redirects" May be set in a file that's ignored by load procedure **</li>
                                          <li/>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.2
              Label: Ensure Only Approved Ports, Protocols and Services Are Running
              Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Fail

            3.3.3 Ensure secure ICMP redirects are not accepted

            Description:

            Secure ICMP redirects are the same as ICMP redirects, except they come from gateways listed on the default gateway list. It is assumed that these gateways are known to your system, and that they are likely to be secure.

            It is still possible for even known gateways to be compromised. Setting net.ipv4.conf.all.secure_redirects and net.ipv4.conf.default.secure_redirects to 0 protects the system from routing table updates by possibly compromised known gateways.

            Set the following parameters in /etc/sysctl.conf or a file in /etc/sysctl.d/ ending in .conf :

            • net.ipv4.conf.all.secure_redirects = 0
            • net.ipv4.conf.default.secure_redirects = 0

            Example:

            # printf "

            net.ipv4.conf.all.secure_redirects = 0

            net.ipv4.conf.default.secure_redirects = 0

            " >> /etc/sysctl.d/60-netipv4_sysctl.conf

            Run the following commands to set the active kernel parameters:

            # {

            sysctl -w net.ipv4.conf.all.secure_redirects=0

            sysctl -w net.ipv4.conf.default.secure_redirects=0

            sysctl -w net.ipv4.route.flush=1

            }

            Note: If these settings appear in a conically later file, or later in the same file, these settings will be overwritten

            Show Assessment Evidence
            Complex Check
            AND
            Script: sce/nix_kernel_parameter_chk_v2.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - "net.ipv4.conf.all.secure_redirects" is incorrectly set to "1" in the running configuration and should have a value of: "0"
            • - "net.ipv4.conf.all.secure_redirects" is not set in an included file
            • ** Note: "net.ipv4.conf.all.secure_redirects" May be set in a file that's ignored by load procedure **
            No error lines were collected.
            Script: sce/nix_kernel_parameter_chk_v2.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - "net.ipv4.conf.default.secure_redirects" is incorrectly set to "1" in the running configuration and should have a value of: "0"
            • - "net.ipv4.conf.default.secure_redirects" is not set in an included file
            • ** Note: "net.ipv4.conf.default.secure_redirects" May be set in a file that's ignored by load procedure **
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.3.3_Ensure_secure_ICMP_redirects_are_not_accepted"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.863-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                         value-id="xccdf_org.cisecurity.benchmarks_value_3995179_var"/>
                     <xccdf:check-content-ref href="sce/nix_kernel_parameter_chk_v2.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/nix_kernel_parameter_chk_v2.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/nix_kernel_parameter_chk_v2.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** FAIL **</l>
                              <l> - Reason(s) for audit failure:</l>
                              <l/>
                              <l> - "net.ipv4.conf.all.secure_redirects" is incorrectly set to "1" in the running configuration and should have a value of: "0"</l>
                              <l> - "net.ipv4.conf.all.secure_redirects" is not set in an included file</l>
                              <l>   ** Note: "net.ipv4.conf.all.secure_redirects" May be set in a file that's ignored by load procedure **</l>
                              <l/>
                              <l/>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/nix_kernel_parameter_chk_v2.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** FAIL **</li>
                                          <li> - Reason(s) for audit failure:</li>
                                          <li/>
                                          <li> - "net.ipv4.conf.all.secure_redirects" is incorrectly set to "1" in the running configuration and should have a value of: "0"</li>
                                          <li> - "net.ipv4.conf.all.secure_redirects" is not set in an included file</li>
                                          <li>   ** Note: "net.ipv4.conf.all.secure_redirects" May be set in a file that's ignored by load procedure **</li>
                                          <li/>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                         value-id="xccdf_org.cisecurity.benchmarks_value_3995182_var"/>
                     <xccdf:check-content-ref href="sce/nix_kernel_parameter_chk_v2.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/nix_kernel_parameter_chk_v2.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/nix_kernel_parameter_chk_v2.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** FAIL **</l>
                              <l> - Reason(s) for audit failure:</l>
                              <l/>
                              <l> - "net.ipv4.conf.default.secure_redirects" is incorrectly set to "1" in the running configuration and should have a value of: "0"</l>
                              <l> - "net.ipv4.conf.default.secure_redirects" is not set in an included file</l>
                              <l>   ** Note: "net.ipv4.conf.default.secure_redirects" May be set in a file that's ignored by load procedure **</l>
                              <l/>
                              <l/>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/nix_kernel_parameter_chk_v2.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** FAIL **</li>
                                          <li> - Reason(s) for audit failure:</li>
                                          <li/>
                                          <li> - "net.ipv4.conf.default.secure_redirects" is incorrectly set to "1" in the running configuration and should have a value of: "0"</li>
                                          <li> - "net.ipv4.conf.default.secure_redirects" is not set in an included file</li>
                                          <li>   ** Note: "net.ipv4.conf.default.secure_redirects" May be set in a file that's ignored by load procedure **</li>
                                          <li/>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.2
              Label: Ensure Only Approved Ports, Protocols and Services Are Running
              Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Fail

            3.3.4 Ensure suspicious packets are logged

            Description:

            When enabled, this feature logs packets with un-routable source addresses to the kernel log.

            Setting net.ipv4.conf.all.log_martians and net.ipv4.conf.default.log_martians to 1` enables this feature. Logging these packets allows an administrator to investigate the possibility that an attacker is sending spoofed packets to their system.

            Set the following parameters in /etc/sysctl.conf or a file in /etc/sysctl.d/ ending in .conf :

            • net.ipv4.conf.all.log_martians = 1
            • net.ipv4.conf.default.log_martians = 1

            Example:

            # printf "

            net.ipv4.conf.all.log_martians = 1

            net.ipv4.conf.default.log_martians = 1

            " >> /etc/sysctl.d/60-netipv4_sysctl.conf

            Run the following command to set the active kernel parameters:

            # {

            sysctl -w net.ipv4.conf.all.log_martians=1

            sysctl -w net.ipv4.conf.default.log_martians=1

            sysctl -w net.ipv4.route.flush=1

            }

            Note: If these settings appear in a conically later file, or later in the same file, these settings will be overwritten

            Show Assessment Evidence
            Complex Check
            AND
            Script: sce/nix_kernel_parameter_chk_v2.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - "net.ipv4.conf.all.log_martians" is not set in an included file
            • ** Note: "net.ipv4.conf.all.log_martians" May be set in a file that's ignored by load procedure **
            • - Correctly set:
            • - "net.ipv4.conf.all.log_martians" is correctly set to "1" in the running configuration
            No error lines were collected.
            Script: sce/nix_kernel_parameter_chk_v2.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - "net.ipv4.conf.default.log_martians" is not set in an included file
            • ** Note: "net.ipv4.conf.default.log_martians" May be set in a file that's ignored by load procedure **
            • - Correctly set:
            • - "net.ipv4.conf.default.log_martians" is correctly set to "1" in the running configuration
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.3.4_Ensure_suspicious_packets_are_logged"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.863-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/3"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/8/subcontrol/5"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AU-3</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                         value-id="xccdf_org.cisecurity.benchmarks_value_3995187_var"/>
                     <xccdf:check-content-ref href="sce/nix_kernel_parameter_chk_v2.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/nix_kernel_parameter_chk_v2.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/nix_kernel_parameter_chk_v2.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** FAIL **</l>
                              <l> - Reason(s) for audit failure:</l>
                              <l/>
                              <l> - "net.ipv4.conf.all.log_martians" is not set in an included file</l>
                              <l>   ** Note: "net.ipv4.conf.all.log_martians" May be set in a file that's ignored by load procedure **</l>
                              <l/>
                              <l/>
                              <l/>
                              <l>- Correctly set:</l>
                              <l/>
                              <l> - "net.ipv4.conf.all.log_martians" is correctly set to "1" in the running configuration</l>
                              <l/>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/nix_kernel_parameter_chk_v2.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** FAIL **</li>
                                          <li> - Reason(s) for audit failure:</li>
                                          <li/>
                                          <li> - "net.ipv4.conf.all.log_martians" is not set in an included file</li>
                                          <li>   ** Note: "net.ipv4.conf.all.log_martians" May be set in a file that's ignored by load procedure **</li>
                                          <li/>
                                          <li/>
                                          <li/>
                                          <li>- Correctly set:</li>
                                          <li/>
                                          <li> - "net.ipv4.conf.all.log_martians" is correctly set to "1" in the running configuration</li>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                         value-id="xccdf_org.cisecurity.benchmarks_value_3995191_var"/>
                     <xccdf:check-content-ref href="sce/nix_kernel_parameter_chk_v2.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/nix_kernel_parameter_chk_v2.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/nix_kernel_parameter_chk_v2.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** FAIL **</l>
                              <l> - Reason(s) for audit failure:</l>
                              <l/>
                              <l> - "net.ipv4.conf.default.log_martians" is not set in an included file</l>
                              <l>   ** Note: "net.ipv4.conf.default.log_martians" May be set in a file that's ignored by load procedure **</l>
                              <l/>
                              <l/>
                              <l/>
                              <l>- Correctly set:</l>
                              <l/>
                              <l> - "net.ipv4.conf.default.log_martians" is correctly set to "1" in the running configuration</l>
                              <l/>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/nix_kernel_parameter_chk_v2.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** FAIL **</li>
                                          <li> - Reason(s) for audit failure:</li>
                                          <li/>
                                          <li> - "net.ipv4.conf.default.log_martians" is not set in an included file</li>
                                          <li>   ** Note: "net.ipv4.conf.default.log_martians" May be set in a file that's ignored by load procedure **</li>
                                          <li/>
                                          <li/>
                                          <li/>
                                          <li>- Correctly set:</li>
                                          <li/>
                                          <li> - "net.ipv4.conf.default.log_martians" is correctly set to "1" in the running configuration</li>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: AU-3

            CIS Controls V7.0:

            • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
              CIS Control Information
              Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
              Subcontrol: 6.2
              Label: Activate audit logging
              Description: Ensure that local logging has been enabled on all systems and networking devices.
            • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
              CIS Control Information
              Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
              Subcontrol: 6.3
              Label: Enable Detailed Logging
              Description: Enable system logging to include detailed information such as a event source, date, user, timestamp, source addresses, destination addresses, and other useful elements.
            • >

            CIS Critical Security Controls V8.0:

            • Control 8: Audit Log Management: -- More
              CIS Control Information
              Control: Collect, alert, review, and retain audit logs of events that could help detect, understand, or recover from an attack.
              Safeguard: 8.5
              Label: Collect Detailed Audit Logs
              Description: Configure detailed audit logging for enterprise assets containing sensitive data. Include event source, date, username, timestamp, source addresses, destination addresses, and other useful elements that could assist in a forensic investigation.
              Implementation Group: IG-2
              Security Function: Detect
            • >

            Fail

            3.3.5 Ensure broadcast ICMP requests are ignored

            Description:

            Setting net.ipv4.icmp_echo_ignore_broadcasts to 1 will cause the system to ignore all ICMP echo and timestamp requests to broadcast and multicast addresses.

            Accepting ICMP echo and timestamp requests with broadcast or multicast destinations for your network could be used to trick your host into starting (or participating) in a Smurf attack. A Smurf attack relies on an attacker sending large amounts of ICMP broadcast messages with a spoofed source address. All hosts receiving this message and responding would send echo-reply messages back to the spoofed address, which is probably not routable. If many hosts respond to the packets, the amount of traffic on the network could be significantly multiplied.

            Set the following parameter in /etc/sysctl.conf or a file in /etc/sysctl.d/ ending in .conf :

            • net.ipv4.icmp_echo_ignore_broadcasts = 1

            Example:

            # printf "

            net.ipv4.icmp_echo_ignore_broadcasts = 1

            " >> /etc/sysctl.d/60-netipv4_sysctl.conf

            Run the following command to set the active kernel parameters:

            # {

            sysctl -w net.ipv4.icmp_echo_ignore_broadcasts=1

            sysctl -w net.ipv4.route.flush=1

            }

            Note: If these settings appear in a conically later file, or later in the same file, these settings will be overwritten

            Show Assessment Evidence
            Complex Check
            AND
            Script: sce/nix_kernel_parameter_chk_v2.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - "net.ipv4.icmp_echo_ignore_broadcasts" is not set in an included file
            • ** Note: "net.ipv4.icmp_echo_ignore_broadcasts" May be set in a file that's ignored by load procedure **
            • - Correctly set:
            • - "net.ipv4.icmp_echo_ignore_broadcasts" is correctly set to "1" in the running configuration
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.3.5_Ensure_broadcast_ICMP_requests_are_ignored"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.863-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                         value-id="xccdf_org.cisecurity.benchmarks_value_3995195_var"/>
                     <xccdf:check-content-ref href="sce/nix_kernel_parameter_chk_v2.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/nix_kernel_parameter_chk_v2.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/nix_kernel_parameter_chk_v2.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** FAIL **</l>
                              <l> - Reason(s) for audit failure:</l>
                              <l/>
                              <l> - "net.ipv4.icmp_echo_ignore_broadcasts" is not set in an included file</l>
                              <l>   ** Note: "net.ipv4.icmp_echo_ignore_broadcasts" May be set in a file that's ignored by load procedure **</l>
                              <l/>
                              <l/>
                              <l/>
                              <l>- Correctly set:</l>
                              <l/>
                              <l> - "net.ipv4.icmp_echo_ignore_broadcasts" is correctly set to "1" in the running configuration</l>
                              <l/>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/nix_kernel_parameter_chk_v2.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** FAIL **</li>
                                          <li> - Reason(s) for audit failure:</li>
                                          <li/>
                                          <li> - "net.ipv4.icmp_echo_ignore_broadcasts" is not set in an included file</li>
                                          <li>   ** Note: "net.ipv4.icmp_echo_ignore_broadcasts" May be set in a file that's ignored by load procedure **</li>
                                          <li/>
                                          <li/>
                                          <li/>
                                          <li>- Correctly set:</li>
                                          <li/>
                                          <li> - "net.ipv4.icmp_echo_ignore_broadcasts" is correctly set to "1" in the running configuration</li>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.2
              Label: Ensure Only Approved Ports, Protocols and Services Are Running
              Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Fail

            3.3.6 Ensure bogus ICMP responses are ignored

            Description:

            Setting net.ipv4.icmp_ignore_bogus_error_responses to 1 prevents the kernel from logging bogus responses (RFC-1122 non-compliant) from broadcast reframes, keeping file systems from filling up with useless log messages.

            Some routers (and some attackers) will send responses that violate RFC-1122 and attempt to fill up a log file system with many useless error messages.

            Set the following parameter in /etc/sysctl.conf or a file in /etc/sysctl.d/ ending in .conf :

            • net.ipv4.icmp_ignore_bogus_error_responses = 1

            Example:

            # printf "

            net.ipv4.icmp_ignore_bogus_error_responses = 1

            " >> /etc/sysctl.d/60-netipv4_sysctl.conf

            Run the following command to set the active kernel parameters:

            # {

            sysctl -w net.ipv4.icmp_ignore_bogus_error_responses=1

            sysctl -w net.ipv4.route.flush=1

            }

            Note: If these settings appear in a conically later file, or later in the same file, these settings will be overwritten

            Show Assessment Evidence
            Complex Check
            AND
            Script: sce/nix_kernel_parameter_chk_v2.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - "net.ipv4.icmp_ignore_bogus_error_responses" is not set in an included file
            • ** Note: "net.ipv4.icmp_ignore_bogus_error_responses" May be set in a file that's ignored by load procedure **
            • - Correctly set:
            • - "net.ipv4.icmp_ignore_bogus_error_responses" is correctly set to "1" in the running configuration
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.3.6_Ensure_bogus_ICMP_responses_are_ignored"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.863-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1,CM-2, CM-6, CM-7, IA-5</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                         value-id="xccdf_org.cisecurity.benchmarks_value_3995200_var"/>
                     <xccdf:check-content-ref href="sce/nix_kernel_parameter_chk_v2.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/nix_kernel_parameter_chk_v2.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/nix_kernel_parameter_chk_v2.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** FAIL **</l>
                              <l> - Reason(s) for audit failure:</l>
                              <l/>
                              <l> - "net.ipv4.icmp_ignore_bogus_error_responses" is not set in an included file</l>
                              <l>   ** Note: "net.ipv4.icmp_ignore_bogus_error_responses" May be set in a file that's ignored by load procedure **</l>
                              <l/>
                              <l/>
                              <l/>
                              <l>- Correctly set:</l>
                              <l/>
                              <l> - "net.ipv4.icmp_ignore_bogus_error_responses" is correctly set to "1" in the running configuration</l>
                              <l/>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/nix_kernel_parameter_chk_v2.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** FAIL **</li>
                                          <li> - Reason(s) for audit failure:</li>
                                          <li/>
                                          <li> - "net.ipv4.icmp_ignore_bogus_error_responses" is not set in an included file</li>
                                          <li>   ** Note: "net.ipv4.icmp_ignore_bogus_error_responses" May be set in a file that's ignored by load procedure **</li>
                                          <li/>
                                          <li/>
                                          <li/>
                                          <li>- Correctly set:</li>
                                          <li/>
                                          <li> - "net.ipv4.icmp_ignore_bogus_error_responses" is correctly set to "1" in the running configuration</li>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-1,CM-2, CM-6, CM-7, IA-5

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.2
              Label: Ensure Only Approved Ports, Protocols and Services Are Running
              Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Fail

            3.3.7 Ensure Reverse Path Filtering is enabled

            Description:

            Setting net.ipv4.conf.all.rp_filter and net.ipv4.conf.default.rp_filter to 1 forces the Linux kernel to utilize reverse path filtering on a received packet to determine if the packet was valid. Essentially, with reverse path filtering, if the return packet does not go out the same interface that the corresponding source packet came from, the packet is dropped (and logged if log_martians is set).

            Setting net.ipv4.conf.all.rp_filter and net.ipv4.conf.default.rp_filter to 1 is a good way to deter attackers from sending your system bogus packets that cannot be responded to. One instance where this feature breaks down is if asymmetrical routing is employed. This would occur when using dynamic routing protocols (bgp, ospf, etc) on your system. If you are using asymmetrical routing on your system, you will not be able to enable this feature without breaking the routing.

            Set the following parameters in /etc/sysctl.conf or a file in /etc/sysctl.d/ ending in .conf :

            • net.ipv4.conf.all.rp_filter = 1
            • net.ipv4.conf.default.rp_filter = 1

            Example:

            # printf "

            net.ipv4.conf.all.rp_filter = 1

            net.ipv4.conf.default.rp_filter = 1

            " >> /etc/sysctl.d/60-netipv4_sysctl.conf

            Run the following commands to set the active kernel parameters:

            # {

            sysctl -w net.ipv4.conf.all.rp_filter=1

            sysctl -w net.ipv4.conf.default.rp_filter=1

            sysctl -w net.ipv4.route.flush=1

            }

            Note: If these settings appear in a conically later file, or later in the same file, these settings will be overwritten

            Impact:

            If you are using asymmetrical routing on your system, you will not be able to enable this feature without breaking the routing.

            Show Assessment Evidence
            Complex Check
            AND
            Script: sce/nix_kernel_parameter_chk_v2.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - "net.ipv4.conf.all.rp_filter" is incorrectly set to "2" in the running configuration and should have a value of: "1"
            • - "net.ipv4.conf.all.rp_filter" is incorrectly set to "2" in "/etc/sysctl.d/10-network-security.conf" and should have a value of: "1"
            No error lines were collected.
            Script: sce/nix_kernel_parameter_chk_v2.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - "net.ipv4.conf.default.rp_filter" is incorrectly set to "2" in the running configuration and should have a value of: "1"
            • - "net.ipv4.conf.default.rp_filter" is incorrectly set to "2" in "/etc/sysctl.d/10-network-security.conf" and should have a value of: "1"
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.3.7_Ensure_Reverse_Path_Filtering_is_enabled"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.863-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1,CM-2, CM-6, CM-7, IA-5</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                         value-id="xccdf_org.cisecurity.benchmarks_value_3995205_var"/>
                     <xccdf:check-content-ref href="sce/nix_kernel_parameter_chk_v2.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/nix_kernel_parameter_chk_v2.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/nix_kernel_parameter_chk_v2.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** FAIL **</l>
                              <l> - Reason(s) for audit failure:</l>
                              <l/>
                              <l> - "net.ipv4.conf.all.rp_filter" is incorrectly set to "2" in the running configuration and should have a value of: "1"</l>
                              <l> - "net.ipv4.conf.all.rp_filter" is incorrectly set to "2" in "/etc/sysctl.d/10-network-security.conf" and should have a value of: "1"</l>
                              <l/>
                              <l/>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/nix_kernel_parameter_chk_v2.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** FAIL **</li>
                                          <li> - Reason(s) for audit failure:</li>
                                          <li/>
                                          <li> - "net.ipv4.conf.all.rp_filter" is incorrectly set to "2" in the running configuration and should have a value of: "1"</li>
                                          <li> - "net.ipv4.conf.all.rp_filter" is incorrectly set to "2" in "/etc/sysctl.d/10-network-security.conf" and should have a value of: "1"</li>
                                          <li/>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                         value-id="xccdf_org.cisecurity.benchmarks_value_3995209_var"/>
                     <xccdf:check-content-ref href="sce/nix_kernel_parameter_chk_v2.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/nix_kernel_parameter_chk_v2.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/nix_kernel_parameter_chk_v2.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** FAIL **</l>
                              <l> - Reason(s) for audit failure:</l>
                              <l/>
                              <l> - "net.ipv4.conf.default.rp_filter" is incorrectly set to "2" in the running configuration and should have a value of: "1"</l>
                              <l> - "net.ipv4.conf.default.rp_filter" is incorrectly set to "2" in "/etc/sysctl.d/10-network-security.conf" and should have a value of: "1"</l>
                              <l/>
                              <l/>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/nix_kernel_parameter_chk_v2.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** FAIL **</li>
                                          <li> - Reason(s) for audit failure:</li>
                                          <li/>
                                          <li> - "net.ipv4.conf.default.rp_filter" is incorrectly set to "2" in the running configuration and should have a value of: "1"</li>
                                          <li> - "net.ipv4.conf.default.rp_filter" is incorrectly set to "2" in "/etc/sysctl.d/10-network-security.conf" and should have a value of: "1"</li>
                                          <li/>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-1,CM-2, CM-6, CM-7, IA-5

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.2
              Label: Ensure Only Approved Ports, Protocols and Services Are Running
              Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Fail

            3.3.8 Ensure TCP SYN Cookies is enabled

            Description:

            When tcp_syncookies is set, the kernel will handle TCP SYN packets normally until the half-open connection queue is full, at which time, the SYN cookie functionality kicks in. SYN cookies work by not using the SYN queue at all. Instead, the kernel simply replies to the SYN with a SYN|ACK, but will include a specially crafted TCP sequence number that encodes the source and destination IP address and port number and the time the packet was sent. A legitimate connection would send the ACK packet of the three way handshake with the specially crafted sequence number. This allows the system to verify that it has received a valid response to a SYN cookie and allow the connection, even though there is no corresponding SYN in the queue.

            Attackers use SYN flood attacks to perform a denial of service attacked on a system by sending many SYN packets without completing the three way handshake. This will quickly use up slots in the kernel's half-open connection queue and prevent legitimate connections from succeeding. Setting net.ipv4.tcp_syncookies to 1 enables SYN cookies, allowing the system to keep accepting valid connections, even if under a denial of service attack.

            Set the following parameter in /etc/sysctl.conf or a file in /etc/sysctl.d/ ending in .conf :

            • net.ipv4.tcp_syncookies = 1

            Example:

            # printf "

            net.ipv4.tcp_syncookies = 1

            " >> /etc/sysctl.d/60-netipv4_sysctl.conf

            Run the following command to set the active kernel parameters:

            # {

            sysctl -w net.ipv4.tcp_syncookies=1

            sysctl -w net.ipv4.route.flush=1

            }

            Note: If these settings appear in a conically later file, or later in the same file, these settings will be overwritten

            Show Assessment Evidence
            Complex Check
            AND
            Script: sce/nix_kernel_parameter_chk_v2.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - "net.ipv4.tcp_syncookies" is not set in an included file
            • ** Note: "net.ipv4.tcp_syncookies" May be set in a file that's ignored by load procedure **
            • - Correctly set:
            • - "net.ipv4.tcp_syncookies" is correctly set to "1" in the running configuration
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.3.8_Ensure_TCP_SYN_Cookies_is_enabled"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.863-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1,CM-2, CM-6, CM-7, IA-5</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                         value-id="xccdf_org.cisecurity.benchmarks_value_3995213_var"/>
                     <xccdf:check-content-ref href="sce/nix_kernel_parameter_chk_v2.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/nix_kernel_parameter_chk_v2.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/nix_kernel_parameter_chk_v2.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** FAIL **</l>
                              <l> - Reason(s) for audit failure:</l>
                              <l/>
                              <l> - "net.ipv4.tcp_syncookies" is not set in an included file</l>
                              <l>   ** Note: "net.ipv4.tcp_syncookies" May be set in a file that's ignored by load procedure **</l>
                              <l/>
                              <l/>
                              <l/>
                              <l>- Correctly set:</l>
                              <l/>
                              <l> - "net.ipv4.tcp_syncookies" is correctly set to "1" in the running configuration</l>
                              <l/>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/nix_kernel_parameter_chk_v2.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** FAIL **</li>
                                          <li> - Reason(s) for audit failure:</li>
                                          <li/>
                                          <li> - "net.ipv4.tcp_syncookies" is not set in an included file</li>
                                          <li>   ** Note: "net.ipv4.tcp_syncookies" May be set in a file that's ignored by load procedure **</li>
                                          <li/>
                                          <li/>
                                          <li/>
                                          <li>- Correctly set:</li>
                                          <li/>
                                          <li> - "net.ipv4.tcp_syncookies" is correctly set to "1" in the running configuration</li>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-1,CM-2, CM-6, CM-7, IA-5

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.2
              Label: Ensure Only Approved Ports, Protocols and Services Are Running
              Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Fail

            3.3.9 Ensure IPv6 router advertisements are not accepted

            Description:

            This setting disables the system's ability to accept IPv6 router advertisements.

            It is recommended that systems do not accept router advertisements as they could be tricked into routing traffic to compromised machines. Setting hard routes within the system (usually a single default route to a trusted router) protects the system from bad routes. Setting net.ipv6.conf.all.accept_ra and net.ipv6.conf.default.accept_ra to 0 disables the system's ability to accept IPv6 router advertisements.

            -IF- IPv6 is enabled on the system:

            Set the following parameters in /etc/sysctl.conf or a file in /etc/sysctl.d/ ending in .conf :

            • net.ipv6.conf.all.accept_ra = 0
            • net.ipv6.conf.default.accept_ra = 0

            Example:

            # printf "

            net.ipv6.conf.all.accept_ra = 0

            net.ipv6.conf.default.accept_ra = 0

            " >> /etc/sysctl.d/60-netipv6_sysctl.conf

            Run the following command to set the active kernel parameters:

            # {

            sysctl -w net.ipv6.conf.all.accept_ra=0

            sysctl -w net.ipv6.conf.default.accept_ra=0

            sysctl -w net.ipv6.route.flush=1

            }

            Note: If these settings appear in a conically later file, or later in the same file, these settings will be overwritten

            Show Assessment Evidence
            Complex Check
            AND
            Script: sce/nix_kernel_parameter_chk_v2.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - "net.ipv6.conf.all.accept_ra" is incorrectly set to "1" in the running configuration and should have a value of: "0"
            • - "net.ipv6.conf.all.accept_ra" is not set in an included file
            • ** Note: "net.ipv6.conf.all.accept_ra" May be set in a file that's ignored by load procedure **
            No error lines were collected.
            Script: sce/nix_kernel_parameter_chk_v2.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - "net.ipv6.conf.default.accept_ra" is incorrectly set to "1" in the running configuration and should have a value of: "0"
            • - "net.ipv6.conf.default.accept_ra" is not set in an included file
            • ** Note: "net.ipv6.conf.default.accept_ra" May be set in a file that's ignored by load procedure **
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.3.9_Ensure_IPv6_router_advertisements_are_not_accepted"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.863-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1,CM-2, CM-6, CM-7, IA-5</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                         value-id="xccdf_org.cisecurity.benchmarks_value_3995218_var"/>
                     <xccdf:check-content-ref href="sce/nix_kernel_parameter_chk_v2.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/nix_kernel_parameter_chk_v2.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/nix_kernel_parameter_chk_v2.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** FAIL **</l>
                              <l> - Reason(s) for audit failure:</l>
                              <l/>
                              <l> - "net.ipv6.conf.all.accept_ra" is incorrectly set to "1" in the running configuration and should have a value of: "0"</l>
                              <l> - "net.ipv6.conf.all.accept_ra" is not set in an included file</l>
                              <l>   ** Note: "net.ipv6.conf.all.accept_ra" May be set in a file that's ignored by load procedure **</l>
                              <l/>
                              <l/>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/nix_kernel_parameter_chk_v2.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** FAIL **</li>
                                          <li> - Reason(s) for audit failure:</li>
                                          <li/>
                                          <li> - "net.ipv6.conf.all.accept_ra" is incorrectly set to "1" in the running configuration and should have a value of: "0"</li>
                                          <li> - "net.ipv6.conf.all.accept_ra" is not set in an included file</li>
                                          <li>   ** Note: "net.ipv6.conf.all.accept_ra" May be set in a file that's ignored by load procedure **</li>
                                          <li/>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                         value-id="xccdf_org.cisecurity.benchmarks_value_3995222_var"/>
                     <xccdf:check-content-ref href="sce/nix_kernel_parameter_chk_v2.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/nix_kernel_parameter_chk_v2.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/nix_kernel_parameter_chk_v2.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** FAIL **</l>
                              <l> - Reason(s) for audit failure:</l>
                              <l/>
                              <l> - "net.ipv6.conf.default.accept_ra" is incorrectly set to "1" in the running configuration and should have a value of: "0"</l>
                              <l> - "net.ipv6.conf.default.accept_ra" is not set in an included file</l>
                              <l>   ** Note: "net.ipv6.conf.default.accept_ra" May be set in a file that's ignored by load procedure **</l>
                              <l/>
                              <l/>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/nix_kernel_parameter_chk_v2.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** FAIL **</li>
                                          <li> - Reason(s) for audit failure:</li>
                                          <li/>
                                          <li> - "net.ipv6.conf.default.accept_ra" is incorrectly set to "1" in the running configuration and should have a value of: "0"</li>
                                          <li> - "net.ipv6.conf.default.accept_ra" is not set in an included file</li>
                                          <li>   ** Note: "net.ipv6.conf.default.accept_ra" May be set in a file that's ignored by load procedure **</li>
                                          <li/>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-1,CM-2, CM-6, CM-7, IA-5

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.2
              Label: Ensure Only Approved Ports, Protocols and Services Are Running
              Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.8
              Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
              Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            3.4 Firewall Configuration

            A firewall is a set of rules. When a data packet moves into or out of a protected network space, its contents (in particular, information about its origin, target, and the protocol it plans to use) are tested against the firewall rules to see if it should be allowed through

            To provide a Host Based Firewall, the Linux kernel includes support for:

            • Netfilter - A set of hooks inside the Linux kernel that allows kernel modules to register callback functions with the network stack. A registered callback function is then called back for every packet that traverses the respective hook within the network stack. Includes the ip_tables, ip6_tables, arp_tables, and ebtables kernel modules. These modules are some of the significant parts of the Netfilter hook system.
            • nftables - A subsystem of the Linux kernel providing filtering and classification of network packets/datagrams/frames. nftables is supposed to replace certain parts of Netfilter, while keeping and reusing most of it. nftables utilizes the building blocks of the Netfilter infrastructure, such as the existing hooks into the networking stack, connection tracking system, userspace queueing component, and logging subsystem. Is available in Linux kernels 3.13 and newer .

            In order to configure firewall rules for Netfilter or nftables, a firewall utility needs to be installed. Guidance has been included for the following firewall utilities:

            • UncomplicatedFirewall (ufw) - Provides firewall features by acting as a front-end for the Linux kernel's netfilter framework via the iptables backend. ufw supports both IPv4 and IPv6 networks
            • nftables - Includes the nft utility for configuration of the nftables subsystem of the Linux kernel
            • iptables - Includes the iptables, ip6tables, arptables and ebtables utilities for configuration Netfilter and the ip_tables, ip6_tables, arp_tables, and ebtables kernel modules.

            Note:

            • Only one method should be used to configure a firewall on the system. Use of more than one method could produce unexpected results
            • This section is intended only to ensure the resulting firewall rules are in place, not how they are configured

            3.4.1 Configure UncomplicatedFirewall

            If nftables or iptables are being used in your environment, please follow the guidance in their respective section and pass-over the guidance in this section.

            Uncomplicated Firewall (UFW) is a program for managing a netfilter firewall designed to be easy to use.

            • Uses a command-line interface consisting of a small number of simple commands
            • Uses iptables for configuration
            • Rules are processed until first matching rule. The first matching rule will be applied.

            Note:

            • Configuration of a live system's firewall directly over a remote connection will often result in being locked out
            • Rules should be ordered so that ALLOW rules come before DENY rules.
            Fail

            3.4.1.1 Ensure ufw is installed

            Description:

            The Uncomplicated Firewall (ufw) is a frontend for iptables and is particularly well-suited for host-based firewalls. ufw provides a framework for managing netfilter, as well as a command-line interface for manipulating the firewall

            A firewall utility is required to configure the Linux kernel's netfilter framework via the iptables or nftables back-end.

            The Linux kernel's netfilter framework host-based firewall can protect against threats originating from within a corporate network to include malicious mobile code and poorly configured software on a host.

            Note: Only one firewall utility should be installed and configured. UFW is dependent on the iptables package

            Run the following command to install Uncomplicated Firewall (UFW):

            apt install ufw

            Show Assessment Evidence
            Complex Check
            OR
            Criterion: Ensure package name equals 'ufw' is installed
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            No matching system items were found.
            Script: sce/no_ufw.sh
            Result: Fail
            Exit Value: 102
            Output:
            • Both IPTables and NFTables are not configured
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.4.1.1_Ensure_ufw_is_installed"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.885-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/5"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: SC-7</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995225"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995225">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995225"
                                   check="all"
                                   check_existence="at_least_one_exists">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'ufw' is installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>At Least One Exists</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/no_ufw.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/no_ufw.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/no_ufw.sh"
                                        exit-value="102">
                           <out>
                              <l>Both IPTables and NFTables are not configured</l>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/no_ufw.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li>Both IPTables and NFTables are not configured</li>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: SC-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.4
              Label: Apply Host-Based Firewalls or Port Filtering
              Description: Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.4
              Label: Implement and Manage a Firewall on Servers
              Description: Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent.
              Implementation Group: IG-1
              Security Function: Protect
            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.5
              Label: Implement and Manage a Firewall on End-User Devices
              Description: Implement and manage a host-based firewall or port-filtering tool on end-user devices, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Pass

            3.4.1.2 Ensure iptables-persistent is not installed with ufw

            Description:

            The iptables-persistent is a boot-time loader for netfilter rules, iptables plugin

            Running both ufw and the services included in the iptables-persistent package may lead to conflict

            Run the following command to remove the iptables-persistent package:

            # apt purge iptables-persistent

            Show Assessment Evidence
            Complex Check
            OR
            Criterion: Ensure package name equals 'iptables-persistent' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Script: sce/no_ufw.sh
            Result: Fail
            Exit Value: 102
            Output:
            • Both IPTables and NFTables are not configured
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.4.1.2_Ensure_iptables-persistent_is_not_installed_with_ufw"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.885-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/5"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: SC-7</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995234"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995234">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995234"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'iptables-persistent' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/no_ufw.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/no_ufw.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/no_ufw.sh"
                                        exit-value="102">
                           <out>
                              <l>Both IPTables and NFTables are not configured</l>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/no_ufw.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li>Both IPTables and NFTables are not configured</li>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: SC-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.4
              Label: Apply Host-Based Firewalls or Port Filtering
              Description: Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.4
              Label: Implement and Manage a Firewall on Servers
              Description: Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent.
              Implementation Group: IG-1
              Security Function: Protect
            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.5
              Label: Implement and Manage a Firewall on End-User Devices
              Description: Implement and manage a host-based firewall or port-filtering tool on end-user devices, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Fail

            3.4.1.3 Ensure ufw service is enabled

            Description:

            UncomplicatedFirewall (ufw) is a frontend for iptables. ufw provides a framework for managing netfilter, as well as a command-line and available graphical user interface for manipulating the firewall.

            Note:

            • When running ufw enable or starting ufw via its initscript, ufw will flush its chains. This is required so ufw can maintain a consistent state, but it may drop existing connections (eg ssh). ufw does support adding rules before enabling the firewall.
            • Run the following command before running ufw enable .
            # ufw allow proto tcp from any to any port 22
            • The rules will still be flushed, but the ssh port will be open after enabling the firewall. Please note that once ufw is 'enabled', ufw will not flush the chains when adding or removing rules (but will when modifying a rule or changing the default policy)
            • By default, ufw will prompt when enabling the firewall while running under ssh. This can be disabled by using ufw --force enable

            The ufw service must be enabled and running in order for ufw to protect the system

            Run the following command to unmask the ufw daemon:

            # systemctl unmask ufw.service

            Run the following command to enable and start the ufw daemon:

            # systemctl --now enable ufw.service



            active

            Run the following command to enable ufw:

            # ufw enable

            Impact:

            Changing firewall settings while connected over network can result in being locked out of the system.

            Show Assessment Evidence
            Complex Check
            OR
            Script: sce/ufw_enabled.sh
            Result: Fail
            Exit Value: 102
            Output:
            • Failed. UFW status is: "UFW is not installed"
            No error lines were collected.
            Script: sce/no_ufw.sh
            Result: Fail
            Exit Value: 102
            Output:
            • Both IPTables and NFTables are not configured
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.4.1.3_Ensure_ufw_service_is_enabled"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.885-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/5"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">http://manpages.ubuntu.com/manpages/precise/en/man8/ufw.8.html</xccdf:ident>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: SC-7</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/ufw_enabled.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/ufw_enabled.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/ufw_enabled.sh"
                                        exit-value="102">
                           <out>
                              <l>Failed. UFW status is: "UFW is not installed"</l>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/ufw_enabled.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li>Failed. UFW status is: "UFW is not installed"</li>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/no_ufw.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/no_ufw.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/no_ufw.sh"
                                        exit-value="102">
                           <out>
                              <l>Both IPTables and NFTables are not configured</l>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/no_ufw.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li>Both IPTables and NFTables are not configured</li>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: http://manpages.ubuntu.com/manpages/precise/en/man8/ufw.8.html
            • URL: NIST SP 800-53 Rev. 5: SC-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.4
              Label: Apply Host-Based Firewalls or Port Filtering
              Description: Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.4
              Label: Implement and Manage a Firewall on Servers
              Description: Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent.
              Implementation Group: IG-1
              Security Function: Protect
            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.5
              Label: Implement and Manage a Firewall on End-User Devices
              Description: Implement and manage a host-based firewall or port-filtering tool on end-user devices, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Fail

            3.4.1.4 Ensure ufw loopback traffic is configured

            Description:

            Configure the loopback interface to accept traffic. Configure all other interfaces to deny traffic to the loopback network (127.0.0.0/8 for IPv4 and ::1/128 for IPv6).

            Loopback traffic is generated between processes on machine and is typically critical to operation of the system. The loopback interface is the only place that loopback network (127.0.0.0/8 for IPv4 and ::1/128 for IPv6) traffic should be seen, all other interfaces should ignore traffic on this network as an anti-spoofing measure.

            Run the following commands to implement the loopback rules:

            # ufw allow in on lo

            # ufw allow out on lo

            # ufw deny in from 127.0.0.0/8

            # ufw deny in from ::1

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Complex Check
            OR
            Script: sce/ufw_status.sh
            Result: Fail
            Exit Value: 102
            Output:
            • Missing ufw rule.
            • - command "ufw status" not avaliable
            No error lines were collected.
            Script: sce/nix_ipv6_disabled_chk.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Results:
            • ** Fail **
            • - IPv6 is enabled on the system
            No error lines were collected.
            Script: sce/ufw_status.sh
            Result: Fail
            Exit Value: 102
            Output:
            • Missing ufw rule.
            • - command "ufw status" not avaliable
            No error lines were collected.
            Script: sce/no_ufw.sh
            Result: Fail
            Exit Value: 102
            Output:
            • Both IPTables and NFTables are not configured
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.4.1.4_Ensure_ufw_loopback_traffic_is_configured"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.885-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/5"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: SC-7</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:complex-check operator="OR" negate="false">
                        <xccdf:check system="http://open-scap.org/page/SCE"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                               value-id="xccdf_org.cisecurity.benchmarks_value_3995249_var"/>
                           <xccdf:check-content-ref href="sce/ufw_status.sh"/>
                           <xccdf:check-content>
                              <command_result href="sce/ufw_status.sh"
                                              xccdf="fail"
                                              script="/root/Assessor/sce/ufw_status.sh"
                                              exit-value="102">
                                 <out>
                                    <l>Missing ufw rule.</l>
                                    <l> - command "ufw status" not avaliable</l>
                                 </out>
                                 <err/>
                                 <env/>
                              </command_result>
                           </xccdf:check-content>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="sce">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Script:</td>
                                          <td>sce/ufw_status.sh</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Exit Value:</td>
                                          <td>102</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Output:</td>
                                          <td>
                                             <ul class="unstyled">
                                                <li>Missing ufw rule.</li>
                                                <li> - command "ufw status" not avaliable</li>
                                             </ul>
                                          </td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td>No error lines were collected.</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </evidence>
                        </xccdf:check>
                        <xccdf:check system="http://open-scap.org/page/SCE"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-content-ref href="sce/nix_ipv6_disabled_chk.sh"/>
                           <xccdf:check-content>
                              <command_result href="sce/nix_ipv6_disabled_chk.sh"
                                              xccdf="fail"
                                              script="/root/Assessor/sce/nix_ipv6_disabled_chk.sh"
                                              exit-value="102">
                                 <out>
                                    <l/>
                                    <l>- Audit Results:</l>
                                    <l> ** Fail **</l>
                                    <l> - IPv6 is enabled on the system</l>
                                 </out>
                                 <err/>
                                 <env/>
                              </command_result>
                           </xccdf:check-content>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="sce">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Script:</td>
                                          <td>sce/nix_ipv6_disabled_chk.sh</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Exit Value:</td>
                                          <td>102</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Output:</td>
                                          <td>
                                             <ul class="unstyled">
                                                <li/>
                                                <li>- Audit Results:</li>
                                                <li> ** Fail **</li>
                                                <li> - IPv6 is enabled on the system</li>
                                             </ul>
                                          </td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td>No error lines were collected.</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </evidence>
                        </xccdf:check>
                     </xccdf:complex-check>
                     <xccdf:check system="http://open-scap.org/page/SCE"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                            value-id="xccdf_org.cisecurity.benchmarks_value_3995246_var"/>
                        <xccdf:check-content-ref href="sce/ufw_status.sh"/>
                        <xccdf:check-content>
                           <command_result href="sce/ufw_status.sh"
                                           xccdf="fail"
                                           script="/root/Assessor/sce/ufw_status.sh"
                                           exit-value="102">
                              <out>
                                 <l>Missing ufw rule.</l>
                                 <l> - command "ufw status" not avaliable</l>
                              </out>
                              <err/>
                              <env/>
                           </command_result>
                        </xccdf:check-content>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="sce">
                              <table class="evidence-sep" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Script:</td>
                                       <td>sce/ufw_status.sh</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Result:</td>
                                       <td class="fail">Fail</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Exit Value:</td>
                                       <td>102</td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Output:</td>
                                       <td>
                                          <ul class="unstyled">
                                             <li>Missing ufw rule.</li>
                                             <li> - command "ufw status" not avaliable</li>
                                          </ul>
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td>No error lines were collected.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/no_ufw.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/no_ufw.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/no_ufw.sh"
                                        exit-value="102">
                           <out>
                              <l>Both IPTables and NFTables are not configured</l>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/no_ufw.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li>Both IPTables and NFTables are not configured</li>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: SC-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.4
              Label: Apply Host-Based Firewalls or Port Filtering
              Description: Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.4
              Label: Implement and Manage a Firewall on Servers
              Description: Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent.
              Implementation Group: IG-1
              Security Function: Protect
            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.5
              Label: Implement and Manage a Firewall on End-User Devices
              Description: Implement and manage a host-based firewall or port-filtering tool on end-user devices, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Manual

            3.4.1.5 Ensure ufw outbound connections are configured

            Description:

            Configure the firewall rules for new outbound connections.

            Note:

            • Changing firewall settings while connected over network can result in being locked out of the system.
            • Unlike iptables, when a new outbound rule is added, ufw automatically takes care of associated established connections, so no rules for the latter kind are required.

            If rules are not in place for new outbound connections all packets will be dropped by the default policy preventing network usage.

            Configure ufw in accordance with site policy. The following commands will implement a policy to allow all outbound connections on all interfaces:

            # ufw allow out on all



            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.4.1.5_Ensure_ufw_outbound_connections_are_configured"
                               role="unscored"
                               severity="unknown"
                               time="2024-04-14T23:46:23.885-04:00"
                               version="1"
                               weight="0.0">
               <xccdf:result>notchecked</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/5"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: SC-7</xccdf:ident>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: SC-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.4
              Label: Apply Host-Based Firewalls or Port Filtering
              Description: Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.4
              Label: Implement and Manage a Firewall on Servers
              Description: Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent.
              Implementation Group: IG-1
              Security Function: Protect
            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.5
              Label: Implement and Manage a Firewall on End-User Devices
              Description: Implement and manage a host-based firewall or port-filtering tool on end-user devices, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Fail

            3.4.1.6 Ensure ufw firewall rules exist for all open ports

            Description:

            Services and ports can be accepted or explicitly rejected.

            Note:

            • Changing firewall settings while connected over network can result in being locked out of the system
            • The remediation command opens up the port to traffic from all sources. Consult ufw documentation and set any restrictions in compliance with site policy

            To reduce the attack surface of a system, all services and ports should be blocked unless required.

            • Any ports that have been opened on non-loopback addresses need firewall rules to govern traffic.
            • Without a firewall rule configured for open ports, the default firewall policy will drop all packets to these ports.
            • Required ports should have a firewall rule created to allow approved connections in accordance with local site policy.
            • Unapproved ports should have an explicit deny rule created.

            For each port identified in the audit which does not have a firewall rule, evaluate the service listening on the port and add a rule for accepting or denying inbound connections in accordance with local site policy:

            Examples:

            # ufw allow in <port>/<tcp or udp protocol>



            # ufw deny in <port>/<tcp or udp protocol>

            Note: Examples create rules for from any, to any. More specific rules should be concentered when allowing inbound traffic e.g only traffic from this network.

            Example to allow traffic on port 443 using the tcp protocol from the 192.168.1.0 network:

            ufw allow from 192.168.1.0/24 to any proto tcp port 443

            Show Assessment Evidence
            Complex Check
            OR
            Script: sce/ufw_open_ports.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - The following port(s) don't have a rule in UFW:
            • 10250
            • 10256
            • 22
            • 2379
            • 2380
            • 38766
            • 39791
            • 6443
            • 8001
            • 8080
            • 8472
            • 8888
            • - End List
            Errors:
            • /root/Assessor/sce/ufw_open_ports.sh: line 19: ufw: command not found
            Script: sce/no_ufw.sh
            Result: Fail
            Exit Value: 102
            Output:
            • Both IPTables and NFTables are not configured
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.4.1.6_Ensure_ufw_firewall_rules_exist_for_all_open_ports"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.885-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: SC-7</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/ufw_open_ports.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/ufw_open_ports.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/ufw_open_ports.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** FAIL **</l>
                              <l> - Reason(s) for audit failure:</l>
                              <l>- The following port(s) don't have a rule in UFW: </l>
                              <l>10250</l>
                              <l>10256</l>
                              <l>22</l>
                              <l>2379</l>
                              <l>2380</l>
                              <l>38766</l>
                              <l>39791</l>
                              <l>6443</l>
                              <l>8001</l>
                              <l>8080</l>
                              <l>8472</l>
                              <l>8888</l>
                              <l>- End List</l>
                              <l/>
                           </out>
                           <err>
                              <l>/root/Assessor/sce/ufw_open_ports.sh: line 19: ufw: command not found</l>
                           </err>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/ufw_open_ports.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** FAIL **</li>
                                          <li> - Reason(s) for audit failure:</li>
                                          <li>- The following port(s) don't have a rule in UFW: </li>
                                          <li>10250</li>
                                          <li>10256</li>
                                          <li>22</li>
                                          <li>2379</li>
                                          <li>2380</li>
                                          <li>38766</li>
                                          <li>39791</li>
                                          <li>6443</li>
                                          <li>8001</li>
                                          <li>8080</li>
                                          <li>8472</li>
                                          <li>8888</li>
                                          <li>- End List</li>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Errors:</td>
                                    <td>
                                       <ul>
                                          <li>/root/Assessor/sce/ufw_open_ports.sh: line 19: ufw: command not found</li>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/no_ufw.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/no_ufw.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/no_ufw.sh"
                                        exit-value="102">
                           <out>
                              <l>Both IPTables and NFTables are not configured</l>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/no_ufw.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li>Both IPTables and NFTables are not configured</li>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: SC-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.4
              Label: Apply Host-Based Firewalls or Port Filtering
              Description: Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.4
              Label: Implement and Manage a Firewall on Servers
              Description: Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Fail

            3.4.1.7 Ensure ufw default deny firewall policy

            Description:

            A default deny policy on connections ensures that any unconfigured network usage will be rejected.

            Note: Any port or protocol without a explicit allow before the default deny will be blocked

            With a default accept policy the firewall will accept any packet that is not configured to be denied. It is easier to white list acceptable usage than to black list unacceptable usage.

            Run the following commands to implement a default deny policy:

            # ufw default deny incoming

            # ufw default deny outgoing

            # ufw default deny routed

            Impact:

            Any port and protocol not explicitly allowed will be blocked. The following rules should be considered before applying the default deny.

            ufw allow git

            ufw allow in http

            ufw allow out http <- required for apt to connect to repository

            ufw allow in https

            ufw allow out https

            ufw allow out 53

            ufw logging on

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Complex Check
            AND
            Script: sce/ufw_status.sh
            Result: Fail
            Exit Value: 102
            Output:
            • Missing ufw rule.
            • - command "ufw status" not avaliable
            No error lines were collected.
            Script: sce/ufw_status.sh
            Result: Fail
            Exit Value: 102
            Output:
            • Missing ufw rule.
            • - command "ufw status" not avaliable
            No error lines were collected.
            Script: sce/ufw_status.sh
            Result: Fail
            Exit Value: 102
            Output:
            • Missing ufw rule.
            • - command "ufw status" not avaliable
            No error lines were collected.
            Script: sce/no_ufw.sh
            Result: Fail
            Exit Value: 102
            Output:
            • Both IPTables and NFTables are not configured
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.4.1.7_Ensure_ufw_default_deny_firewall_policy"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.885-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/5"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: SC-7</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:complex-check operator="AND" negate="false">
                        <xccdf:check system="http://open-scap.org/page/SCE"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                               value-id="xccdf_org.cisecurity.benchmarks_value_3995264_var"/>
                           <xccdf:check-content-ref href="sce/ufw_status.sh"/>
                           <xccdf:check-content>
                              <command_result href="sce/ufw_status.sh"
                                              xccdf="fail"
                                              script="/root/Assessor/sce/ufw_status.sh"
                                              exit-value="102">
                                 <out>
                                    <l>Missing ufw rule.</l>
                                    <l> - command "ufw status" not avaliable</l>
                                 </out>
                                 <err/>
                                 <env/>
                              </command_result>
                           </xccdf:check-content>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="sce">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Script:</td>
                                          <td>sce/ufw_status.sh</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Exit Value:</td>
                                          <td>102</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Output:</td>
                                          <td>
                                             <ul class="unstyled">
                                                <li>Missing ufw rule.</li>
                                                <li> - command "ufw status" not avaliable</li>
                                             </ul>
                                          </td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td>No error lines were collected.</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </evidence>
                        </xccdf:check>
                        <xccdf:check system="http://open-scap.org/page/SCE"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                               value-id="xccdf_org.cisecurity.benchmarks_value_3995267_var"/>
                           <xccdf:check-content-ref href="sce/ufw_status.sh"/>
                           <xccdf:check-content>
                              <command_result href="sce/ufw_status.sh"
                                              xccdf="fail"
                                              script="/root/Assessor/sce/ufw_status.sh"
                                              exit-value="102">
                                 <out>
                                    <l>Missing ufw rule.</l>
                                    <l> - command "ufw status" not avaliable</l>
                                 </out>
                                 <err/>
                                 <env/>
                              </command_result>
                           </xccdf:check-content>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="sce">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Script:</td>
                                          <td>sce/ufw_status.sh</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Exit Value:</td>
                                          <td>102</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Output:</td>
                                          <td>
                                             <ul class="unstyled">
                                                <li>Missing ufw rule.</li>
                                                <li> - command "ufw status" not avaliable</li>
                                             </ul>
                                          </td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td>No error lines were collected.</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </evidence>
                        </xccdf:check>
                     </xccdf:complex-check>
                     <xccdf:check system="http://open-scap.org/page/SCE"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                            value-id="xccdf_org.cisecurity.benchmarks_value_3995269_var"/>
                        <xccdf:check-content-ref href="sce/ufw_status.sh"/>
                        <xccdf:check-content>
                           <command_result href="sce/ufw_status.sh"
                                           xccdf="fail"
                                           script="/root/Assessor/sce/ufw_status.sh"
                                           exit-value="102">
                              <out>
                                 <l>Missing ufw rule.</l>
                                 <l> - command "ufw status" not avaliable</l>
                              </out>
                              <err/>
                              <env/>
                           </command_result>
                        </xccdf:check-content>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="sce">
                              <table class="evidence-sep" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Script:</td>
                                       <td>sce/ufw_status.sh</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Result:</td>
                                       <td class="fail">Fail</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Exit Value:</td>
                                       <td>102</td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Output:</td>
                                       <td>
                                          <ul class="unstyled">
                                             <li>Missing ufw rule.</li>
                                             <li> - command "ufw status" not avaliable</li>
                                          </ul>
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td>No error lines were collected.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/no_ufw.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/no_ufw.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/no_ufw.sh"
                                        exit-value="102">
                           <out>
                              <l>Both IPTables and NFTables are not configured</l>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/no_ufw.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li>Both IPTables and NFTables are not configured</li>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: SC-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.4
              Label: Apply Host-Based Firewalls or Port Filtering
              Description: Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.4
              Label: Implement and Manage a Firewall on Servers
              Description: Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent.
              Implementation Group: IG-1
              Security Function: Protect
            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.5
              Label: Implement and Manage a Firewall on End-User Devices
              Description: Implement and manage a host-based firewall or port-filtering tool on end-user devices, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            3.4.2 Configure nftables

            If Uncomplicated Firewall (UFW) or iptables are being used in your environment, please follow the guidance in their respective section and pass-over the guidance in this section.

            nftables is a subsystem of the Linux kernel providing filtering and classification of network packets/datagrams/frames and is the successor to iptables. The biggest change with the successor nftables is its simplicity. With iptables, we have to configure every single rule and use the syntax which can be compared with normal commands. With nftables, the simpler syntax, much like BPF (Berkely Packet Filter) means shorter lines and less repetition. Support for nftables should also be compiled into the kernel, together with the related nftables modules. Please ensure that your kernel supports nf_tables before choosing this option.

            Note:

            • This section broadly assumes starting with an empty nftables firewall ruleset (established by flushing the rules with nft flush ruleset).
            • Remediation steps included only affect the live system, you will also need to configure your default firewall configuration to apply on boot.
            • Configuration of a live systems firewall directly over a remote connection will often result in being locked out. It is advised to have a known good firewall configuration set to run on boot and to configure an entire firewall structure in a script that is then run and tested before saving to boot.

            The following will implement the firewall rules of this section and open ICMP, IGMP, and port 22(ssh) from anywhere. Opening the ports for ICMP, IGMP, and port 22(ssh) needs to be updated in accordance with local site policy. Allow port 22(ssh) needs to be updated to only allow systems requiring ssh connectivity to connect, as per site policy .

            Save the script bellow as /etc/nftables.rules

            #!/sbin/nft -f



            # This nftables.rules config should be saved as /etc/nftables.rules

            # flush nftables rulesset

            flush ruleset

            # Load nftables ruleset

            # nftables config with inet table named filter

            table inet filter {

            # Base chain for input hook named input (Filters inbound network packets)

            chain input {

            type filter hook input priority 0; policy drop;



            # Ensure loopback traffic is configured

            iif "lo" accept

            ip saddr 127.0.0.0/8 counter packets 0 bytes 0 drop

            ip6 saddr ::1 counter packets 0 bytes 0 drop



            # Ensure established connections are configured

            ip protocol tcp ct state established accept

            ip protocol udp ct state established accept

            ip protocol icmp ct state established accept



            # Accept port 22(SSH) traffic from anywhere

            tcp dport ssh accept



            # Accept ICMP and IGMP from anywhere

            icmpv6 type { destination-unreachable, packet-too-big, time-exceeded, parameter-problem, mld-listener-query, mld-listener-report, mld-listener-done, nd-router-solicit, nd-router-advert, nd-neighbor-solicit, nd-neighbor-advert, ind-neighbor-solicit, ind-neighbor-advert, mld2-listener-report } accept

            icmp type { destination-unreachable, router-advertisement, router-solicitation, time-exceeded, parameter-problem } accept

            ip protocol igmp accept

            }



            # Base chain for hook forward named forward (Filters forwarded network packets)

            chain forward {

            type filter hook forward priority 0; policy drop;

            }



            # Base chain for hook output named output (Filters outbount network packets)

            chain output {

            type filter hook output priority 0; policy drop;

            # Ensure outbound and established connections are configured

            ip protocol tcp ct state established,related,new accept

            ip protocol udp ct state established,related,new accept

            ip protocol icmp ct state established,related,new accept

            }

            }

            Run the following command to load the file into nftables

            # nft -f /etc/nftables.rules

            All changes in the nftables subsections are temporary.

            To make these changes permanent:

            Run the following command to create the nftables.rules file

            nft list ruleset > /etc/nftables.rules

            Add the following line to /etc/nftables.conf

            include "/etc/nftables.rules"
            Fail

            3.4.2.1 Ensure nftables is installed

            Description:

            nftables provides a new in-kernel packet classification framework that is based on a network-specific Virtual Machine (VM) and a new nft userspace command line tool. nftables reuses the existing Netfilter subsystems such as the existing hook infrastructure, the connection tracking system, NAT, userspace queuing and logging subsystem.

            Notes:

            • nftables is available in Linux kernel 3.13 and newer
            • Only one firewall utility should be installed and configured
            • Changing firewall settings while connected over the network can result in being locked out of the system

            nftables is a subsystem of the Linux kernel that can protect against threats originating from within a corporate network to include malicious mobile code and poorly configured software on a host.

            Run the following command to install nftables :

            # apt install nftables

            Show Assessment Evidence
            Complex Check
            OR
            Criterion: Ensure package name equals 'nftables' is installed
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            No matching system items were found.
            Script: sce/deb_no_nftables.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - No firewall is configured on the system
            • -- INFO --
            • - UFW is not configured
            • - NFTables is not configured
            • - IPTables is not configured
            Errors:
            • /root/Assessor/sce/deb_no_nftables.sh: line 16: ufw: command not found


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.1_Ensure_nftables_is_installed"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.886-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/5"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CA-9, SC-7</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995274"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995274">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995274"
                                   check="all"
                                   check_existence="at_least_one_exists">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'nftables' is installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>At Least One Exists</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/deb_no_nftables.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/deb_no_nftables.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/deb_no_nftables.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** FAIL **</l>
                              <l> - Reason(s) for audit failure:</l>
                              <l/>
                              <l>  - No firewall is configured on the system</l>
                              <l/>
                              <l/>
                              <l>  -- INFO --</l>
                              <l/>
                              <l>  - UFW is not configured</l>
                              <l>  - NFTables is not configured</l>
                              <l>  - IPTables is not configured</l>
                              <l/>
                           </out>
                           <err>
                              <l>/root/Assessor/sce/deb_no_nftables.sh: line 16: ufw: command not found</l>
                           </err>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/deb_no_nftables.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** FAIL **</li>
                                          <li> - Reason(s) for audit failure:</li>
                                          <li/>
                                          <li>  - No firewall is configured on the system</li>
                                          <li/>
                                          <li/>
                                          <li>  -- INFO --</li>
                                          <li/>
                                          <li>  - UFW is not configured</li>
                                          <li>  - NFTables is not configured</li>
                                          <li>  - IPTables is not configured</li>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Errors:</td>
                                    <td>
                                       <ul>
                                          <li>/root/Assessor/sce/deb_no_nftables.sh: line 16: ufw: command not found</li>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CA-9, SC-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.4
              Label: Apply Host-Based Firewalls or Port Filtering
              Description: Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.4
              Label: Implement and Manage a Firewall on Servers
              Description: Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent.
              Implementation Group: IG-1
              Security Function: Protect
            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.5
              Label: Implement and Manage a Firewall on End-User Devices
              Description: Implement and manage a host-based firewall or port-filtering tool on end-user devices, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Pass

            3.4.2.2 Ensure ufw is uninstalled or disabled with nftables

            Description:

            Uncomplicated Firewall (UFW) is a program for managing a netfilter firewall designed to be easy to use.

            Running both the nftables service and ufw may lead to conflict and unexpected results.

            Run one of the following to either remove ufwor disable ufw and mask ufw.service :

            Run the following command to remove ufw :

            # apt purge ufw

            -OR-

            Run the following commands to disable ufw and mask ufw.service :

            # ufw disable

            # systemctl stop ufw.service

            # systemctl mask ufw.service

            Note:ufw disable needs to be run before systemctl mask ufw.service in order to correctly disable UFW

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            OR
            Criterion: Ensure package name equals 'ufw' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Script: sce/ufw_disabled.sh
            Result: Pass
            Exit Value: 101
            Output:
            • UFW status is: "UFW is not installed"
            No error lines were collected.
            Script: sce/deb_no_nftables.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - No firewall is configured on the system
            • -- INFO --
            • - UFW is not configured
            • - NFTables is not configured
            • - IPTables is not configured
            Errors:
            • /root/Assessor/sce/deb_no_nftables.sh: line 16: ufw: command not found


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.2_Ensure_ufw_is_uninstalled_or_disabled_with_nftables"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.886-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/5"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: SC-7</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="OR" negate="false">
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995279"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995279">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995279"
                                      check="all"
                                      check_existence="none_exist">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure package name equals 'ufw' is not installed</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>None Exist</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                     <xccdf:check system="http://open-scap.org/page/SCE"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="sce/ufw_disabled.sh"/>
                        <xccdf:check-content>
                           <command_result href="sce/ufw_disabled.sh"
                                           xccdf="pass"
                                           script="/root/Assessor/sce/ufw_disabled.sh"
                                           exit-value="101">
                              <out>
                                 <l>UFW status is: "UFW is not installed"</l>
                              </out>
                              <err/>
                              <env/>
                           </command_result>
                        </xccdf:check-content>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="sce">
                              <table class="evidence-sep" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Script:</td>
                                       <td>sce/ufw_disabled.sh</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Result:</td>
                                       <td class="pass">Pass</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Exit Value:</td>
                                       <td>101</td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Output:</td>
                                       <td>
                                          <ul class="unstyled">
                                             <li>UFW status is: "UFW is not installed"</li>
                                          </ul>
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td>No error lines were collected.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/deb_no_nftables.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/deb_no_nftables.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/deb_no_nftables.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** FAIL **</l>
                              <l> - Reason(s) for audit failure:</l>
                              <l/>
                              <l>  - No firewall is configured on the system</l>
                              <l/>
                              <l/>
                              <l>  -- INFO --</l>
                              <l/>
                              <l>  - UFW is not configured</l>
                              <l>  - NFTables is not configured</l>
                              <l>  - IPTables is not configured</l>
                              <l/>
                           </out>
                           <err>
                              <l>/root/Assessor/sce/deb_no_nftables.sh: line 16: ufw: command not found</l>
                           </err>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/deb_no_nftables.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** FAIL **</li>
                                          <li> - Reason(s) for audit failure:</li>
                                          <li/>
                                          <li>  - No firewall is configured on the system</li>
                                          <li/>
                                          <li/>
                                          <li>  -- INFO --</li>
                                          <li/>
                                          <li>  - UFW is not configured</li>
                                          <li>  - NFTables is not configured</li>
                                          <li>  - IPTables is not configured</li>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Errors:</td>
                                    <td>
                                       <ul>
                                          <li>/root/Assessor/sce/deb_no_nftables.sh: line 16: ufw: command not found</li>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: SC-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.4
              Label: Apply Host-Based Firewalls or Port Filtering
              Description: Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.4
              Label: Implement and Manage a Firewall on Servers
              Description: Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent.
              Implementation Group: IG-1
              Security Function: Protect
            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.5
              Label: Implement and Manage a Firewall on End-User Devices
              Description: Implement and manage a host-based firewall or port-filtering tool on end-user devices, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Manual

            3.4.2.3 Ensure iptables are flushed with nftables

            Description:

            nftables is a replacement for iptables, ip6tables, ebtables and arptables

            It is possible to mix iptables and nftables. However, this increases complexity and also the chance to introduce errors. For simplicity flush out all iptables rules, and ensure it is not loaded

            Run the following commands to flush iptables:

            For iptables:

            # iptables -F

            For ip6tables:

            # ip6tables -F



            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.3_Ensure_iptables_are_flushed_with_nftables"
                               role="unscored"
                               severity="unknown"
                               time="2024-04-14T23:46:23.886-04:00"
                               version="1"
                               weight="0.0">
               <xccdf:result>notchecked</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/5"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CA-9, SC-7</xccdf:ident>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CA-9, SC-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.4
              Label: Apply Host-Based Firewalls or Port Filtering
              Description: Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.4
              Label: Implement and Manage a Firewall on Servers
              Description: Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent.
              Implementation Group: IG-1
              Security Function: Protect
            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.5
              Label: Implement and Manage a Firewall on End-User Devices
              Description: Implement and manage a host-based firewall or port-filtering tool on end-user devices, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Fail

            3.4.2.4 Ensure a nftables table exists

            Description:

            Tables hold chains. Each table only has one address family and only applies to packets of this family. Tables can have one of five families.

            nftables doesn't have any default tables. Without a table being build, nftables will not filter network traffic.

            Run the following command to create a table in nftables

            # nft create table inet <table name>

            Example:

            # nft create table inet filter

            Impact:

            Adding rules to a running nftables can cause loss of connectivity to the system

            Show Assessment Evidence
            Complex Check
            OR
            Script: sce/nft_tables.sh
            Result: Fail
            Exit Value: 102
            Output:
            • Missing nftables rule.
            Errors:
            • /root/Assessor/sce/nft_tables.sh: line 12: nft: command not found
            Script: sce/deb_no_nftables.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - No firewall is configured on the system
            • -- INFO --
            • - UFW is not configured
            • - NFTables is not configured
            • - IPTables is not configured
            Errors:
            • /root/Assessor/sce/deb_no_nftables.sh: line 16: ufw: command not found


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.4_Ensure_a_nftables_table_exists"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.887-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/5"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CA-9, SC-7</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                         value-id="xccdf_org.cisecurity.benchmarks_value_3995287_var"/>
                     <xccdf:check-content-ref href="sce/nft_tables.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/nft_tables.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/nft_tables.sh"
                                        exit-value="102">
                           <out>
                              <l>Missing nftables rule.</l>
                           </out>
                           <err>
                              <l>/root/Assessor/sce/nft_tables.sh: line 12: nft: command not found</l>
                           </err>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/nft_tables.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li>Missing nftables rule.</li>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Errors:</td>
                                    <td>
                                       <ul>
                                          <li>/root/Assessor/sce/nft_tables.sh: line 12: nft: command not found</li>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/deb_no_nftables.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/deb_no_nftables.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/deb_no_nftables.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** FAIL **</l>
                              <l> - Reason(s) for audit failure:</l>
                              <l/>
                              <l>  - No firewall is configured on the system</l>
                              <l/>
                              <l/>
                              <l>  -- INFO --</l>
                              <l/>
                              <l>  - UFW is not configured</l>
                              <l>  - NFTables is not configured</l>
                              <l>  - IPTables is not configured</l>
                              <l/>
                           </out>
                           <err>
                              <l>/root/Assessor/sce/deb_no_nftables.sh: line 16: ufw: command not found</l>
                           </err>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/deb_no_nftables.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** FAIL **</li>
                                          <li> - Reason(s) for audit failure:</li>
                                          <li/>
                                          <li>  - No firewall is configured on the system</li>
                                          <li/>
                                          <li/>
                                          <li>  -- INFO --</li>
                                          <li/>
                                          <li>  - UFW is not configured</li>
                                          <li>  - NFTables is not configured</li>
                                          <li>  - IPTables is not configured</li>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Errors:</td>
                                    <td>
                                       <ul>
                                          <li>/root/Assessor/sce/deb_no_nftables.sh: line 16: ufw: command not found</li>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CA-9, SC-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.4
              Label: Apply Host-Based Firewalls or Port Filtering
              Description: Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.4
              Label: Implement and Manage a Firewall on Servers
              Description: Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent.
              Implementation Group: IG-1
              Security Function: Protect
            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.5
              Label: Implement and Manage a Firewall on End-User Devices
              Description: Implement and manage a host-based firewall or port-filtering tool on end-user devices, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Fail

            3.4.2.5 Ensure nftables base chains exist

            Description:

            Chains are containers for rules. They exist in two kinds, base chains and regular chains. A base chain is an entry point for packets from the networking stack, a regular chain may be used as jump target and is used for better rule organization.

            If a base chain doesn't exist with a hook for input, forward, and delete, packets that would flow through those chains will not be touched by nftables.

            Run the following command to create the base chains:

            # nft create chain inet <table name> <base chain name> { type filter hook <(input|forward|output)> priority 0 \; }

            Example:

            # nft create chain inet filter input { type filter hook input priority 0 \; }



            # nft create chain inet filter forward { type filter hook forward priority 0 \; }



            # nft create chain inet filter output { type filter hook output priority 0 \; }

            Impact:

            If configuring nftables over ssh, creating a base chain with a policy of drop will cause loss of connectivity.

            Ensure that a rule allowing ssh has been added to the base chain prior to setting the base chain's policy to drop

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Complex Check
            AND
            Script: sce/nft_ruleset.sh
            Result: Fail
            Exit Value: 102
            Output:
            • Missing nftables rule.
            Errors:
            • /root/Assessor/sce/nft_ruleset.sh: line 11: nft: command not found
            Script: sce/nft_ruleset.sh
            Result: Fail
            Exit Value: 102
            Output:
            • Missing nftables rule.
            Errors:
            • /root/Assessor/sce/nft_ruleset.sh: line 11: nft: command not found
            Script: sce/nft_ruleset.sh
            Result: Fail
            Exit Value: 102
            Output:
            • Missing nftables rule.
            Errors:
            • /root/Assessor/sce/nft_ruleset.sh: line 11: nft: command not found
            Script: sce/deb_no_nftables.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - No firewall is configured on the system
            • -- INFO --
            • - UFW is not configured
            • - NFTables is not configured
            • - IPTables is not configured
            Errors:
            • /root/Assessor/sce/deb_no_nftables.sh: line 16: ufw: command not found


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.5_Ensure_nftables_base_chains_exist"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.887-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/5"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CA-9, SC-7</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:complex-check operator="AND" negate="false">
                        <xccdf:check system="http://open-scap.org/page/SCE"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                               value-id="xccdf_org.cisecurity.benchmarks_value_3995292_var"/>
                           <xccdf:check-content-ref href="sce/nft_ruleset.sh"/>
                           <xccdf:check-content>
                              <command_result href="sce/nft_ruleset.sh"
                                              xccdf="fail"
                                              script="/root/Assessor/sce/nft_ruleset.sh"
                                              exit-value="102">
                                 <out>
                                    <l>Missing nftables rule.</l>
                                 </out>
                                 <err>
                                    <l>/root/Assessor/sce/nft_ruleset.sh: line 11: nft: command not found</l>
                                 </err>
                                 <env/>
                              </command_result>
                           </xccdf:check-content>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="sce">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Script:</td>
                                          <td>sce/nft_ruleset.sh</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Exit Value:</td>
                                          <td>102</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Output:</td>
                                          <td>
                                             <ul class="unstyled">
                                                <li>Missing nftables rule.</li>
                                             </ul>
                                          </td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Errors:</td>
                                          <td>
                                             <ul>
                                                <li>/root/Assessor/sce/nft_ruleset.sh: line 11: nft: command not found</li>
                                             </ul>
                                          </td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </evidence>
                        </xccdf:check>
                        <xccdf:check system="http://open-scap.org/page/SCE"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                               value-id="xccdf_org.cisecurity.benchmarks_value_3995294_var"/>
                           <xccdf:check-content-ref href="sce/nft_ruleset.sh"/>
                           <xccdf:check-content>
                              <command_result href="sce/nft_ruleset.sh"
                                              xccdf="fail"
                                              script="/root/Assessor/sce/nft_ruleset.sh"
                                              exit-value="102">
                                 <out>
                                    <l>Missing nftables rule.</l>
                                 </out>
                                 <err>
                                    <l>/root/Assessor/sce/nft_ruleset.sh: line 11: nft: command not found</l>
                                 </err>
                                 <env/>
                              </command_result>
                           </xccdf:check-content>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="sce">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Script:</td>
                                          <td>sce/nft_ruleset.sh</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Exit Value:</td>
                                          <td>102</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Output:</td>
                                          <td>
                                             <ul class="unstyled">
                                                <li>Missing nftables rule.</li>
                                             </ul>
                                          </td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Errors:</td>
                                          <td>
                                             <ul>
                                                <li>/root/Assessor/sce/nft_ruleset.sh: line 11: nft: command not found</li>
                                             </ul>
                                          </td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </evidence>
                        </xccdf:check>
                     </xccdf:complex-check>
                     <xccdf:check system="http://open-scap.org/page/SCE"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                            value-id="xccdf_org.cisecurity.benchmarks_value_3995297_var"/>
                        <xccdf:check-content-ref href="sce/nft_ruleset.sh"/>
                        <xccdf:check-content>
                           <command_result href="sce/nft_ruleset.sh"
                                           xccdf="fail"
                                           script="/root/Assessor/sce/nft_ruleset.sh"
                                           exit-value="102">
                              <out>
                                 <l>Missing nftables rule.</l>
                              </out>
                              <err>
                                 <l>/root/Assessor/sce/nft_ruleset.sh: line 11: nft: command not found</l>
                              </err>
                              <env/>
                           </command_result>
                        </xccdf:check-content>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="sce">
                              <table class="evidence-sep" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Script:</td>
                                       <td>sce/nft_ruleset.sh</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Result:</td>
                                       <td class="fail">Fail</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Exit Value:</td>
                                       <td>102</td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Output:</td>
                                       <td>
                                          <ul class="unstyled">
                                             <li>Missing nftables rule.</li>
                                          </ul>
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Errors:</td>
                                       <td>
                                          <ul>
                                             <li>/root/Assessor/sce/nft_ruleset.sh: line 11: nft: command not found</li>
                                          </ul>
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/deb_no_nftables.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/deb_no_nftables.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/deb_no_nftables.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** FAIL **</l>
                              <l> - Reason(s) for audit failure:</l>
                              <l/>
                              <l>  - No firewall is configured on the system</l>
                              <l/>
                              <l/>
                              <l>  -- INFO --</l>
                              <l/>
                              <l>  - UFW is not configured</l>
                              <l>  - NFTables is not configured</l>
                              <l>  - IPTables is not configured</l>
                              <l/>
                           </out>
                           <err>
                              <l>/root/Assessor/sce/deb_no_nftables.sh: line 16: ufw: command not found</l>
                           </err>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/deb_no_nftables.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** FAIL **</li>
                                          <li> - Reason(s) for audit failure:</li>
                                          <li/>
                                          <li>  - No firewall is configured on the system</li>
                                          <li/>
                                          <li/>
                                          <li>  -- INFO --</li>
                                          <li/>
                                          <li>  - UFW is not configured</li>
                                          <li>  - NFTables is not configured</li>
                                          <li>  - IPTables is not configured</li>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Errors:</td>
                                    <td>
                                       <ul>
                                          <li>/root/Assessor/sce/deb_no_nftables.sh: line 16: ufw: command not found</li>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CA-9, SC-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.4
              Label: Apply Host-Based Firewalls or Port Filtering
              Description: Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.4
              Label: Implement and Manage a Firewall on Servers
              Description: Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent.
              Implementation Group: IG-1
              Security Function: Protect
            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.5
              Label: Implement and Manage a Firewall on End-User Devices
              Description: Implement and manage a host-based firewall or port-filtering tool on end-user devices, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Fail

            3.4.2.6 Ensure nftables loopback traffic is configured

            Description:

            Configure the loopback interface to accept traffic. Configure all other interfaces to deny traffic to the loopback network

            Loopback traffic is generated between processes on machine and is typically critical to operation of the system. The loopback interface is the only place that loopback network traffic should be seen, all other interfaces should ignore traffic on this network as an anti-spoofing measure.

            Run the following commands to implement the loopback rules:

            # nft add rule inet filter input iif lo accept # nft create rule inet filter input ip saddr 127.0.0.0/8 counter drop

            -IF- IPv6 is enabled on the system:

            Run the following command to implement the IPv6 loopback rule:

            # nft add rule inet filter input ip6 saddr ::1 counter drop

            Show Assessment Evidence
            Complex Check
            OR
            Script: sce/nft_loopback.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - * Reasons for audit failure * :
            • - Loopback interface is not configured to accept network traffic
            • - Network traffic from iPv4 loopback interface is not configured to drop
            • - Network traffic from iPv6 loopback interface is not configured to drop
            No error lines were collected.
            Script: sce/deb_no_nftables.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - No firewall is configured on the system
            • -- INFO --
            • - UFW is not configured
            • - NFTables is not configured
            • - IPTables is not configured
            Errors:
            • /root/Assessor/sce/deb_no_nftables.sh: line 16: ufw: command not found


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.6_Ensure_nftables_loopback_traffic_is_configured"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.887-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/5"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CA-9, SC-7</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/nft_loopback.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/nft_loopback.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/nft_loopback.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** FAIL **</l>
                              <l> - * Reasons for audit failure * :</l>
                              <l/>
                              <l> - Loopback interface is not configured to accept network traffic</l>
                              <l> - Network traffic from iPv4 loopback interface is not configured to drop</l>
                              <l> - Network traffic from iPv6 loopback interface is not configured to drop</l>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/nft_loopback.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** FAIL **</li>
                                          <li> - * Reasons for audit failure * :</li>
                                          <li/>
                                          <li> - Loopback interface is not configured to accept network traffic</li>
                                          <li> - Network traffic from iPv4 loopback interface is not configured to drop</li>
                                          <li> - Network traffic from iPv6 loopback interface is not configured to drop</li>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/deb_no_nftables.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/deb_no_nftables.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/deb_no_nftables.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** FAIL **</l>
                              <l> - Reason(s) for audit failure:</l>
                              <l/>
                              <l>  - No firewall is configured on the system</l>
                              <l/>
                              <l/>
                              <l>  -- INFO --</l>
                              <l/>
                              <l>  - UFW is not configured</l>
                              <l>  - NFTables is not configured</l>
                              <l>  - IPTables is not configured</l>
                              <l/>
                           </out>
                           <err>
                              <l>/root/Assessor/sce/deb_no_nftables.sh: line 16: ufw: command not found</l>
                           </err>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/deb_no_nftables.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** FAIL **</li>
                                          <li> - Reason(s) for audit failure:</li>
                                          <li/>
                                          <li>  - No firewall is configured on the system</li>
                                          <li/>
                                          <li/>
                                          <li>  -- INFO --</li>
                                          <li/>
                                          <li>  - UFW is not configured</li>
                                          <li>  - NFTables is not configured</li>
                                          <li>  - IPTables is not configured</li>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Errors:</td>
                                    <td>
                                       <ul>
                                          <li>/root/Assessor/sce/deb_no_nftables.sh: line 16: ufw: command not found</li>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CA-9, SC-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.4
              Label: Apply Host-Based Firewalls or Port Filtering
              Description: Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.4
              Label: Implement and Manage a Firewall on Servers
              Description: Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent.
              Implementation Group: IG-1
              Security Function: Protect
            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.5
              Label: Implement and Manage a Firewall on End-User Devices
              Description: Implement and manage a host-based firewall or port-filtering tool on end-user devices, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Manual

            3.4.2.7 Ensure nftables outbound and established connections are configured

            Description:

            Configure the firewall rules for new outbound, and established connections

            If rules are not in place for new outbound, and established connections all packets will be dropped by the default policy preventing network usage.

            Configure nftables in accordance with site policy. The following commands will implement a policy to allow all outbound connections and all established connections:

            # nft add rule inet filter input ip protocol tcp ct state established accept



            # nft add rule inet filter input ip protocol udp ct state established accept



            # nft add rule inet filter input ip protocol icmp ct state established accept



            # nft add rule inet filter output ip protocol tcp ct state new,related,established accept



            # nft add rule inet filter output ip protocol udp ct state new,related,established accept



            # nft add rule inet filter output ip protocol icmp ct state new,related,established accept



            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.7_Ensure_nftables_outbound_and_established_connections_are_configured"
                               role="unscored"
                               severity="unknown"
                               time="2024-04-14T23:46:23.887-04:00"
                               version="1"
                               weight="0.0">
               <xccdf:result>notchecked</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/5"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CA-9, SC-7</xccdf:ident>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CA-9, SC-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.4
              Label: Apply Host-Based Firewalls or Port Filtering
              Description: Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.4
              Label: Implement and Manage a Firewall on Servers
              Description: Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent.
              Implementation Group: IG-1
              Security Function: Protect
            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.5
              Label: Implement and Manage a Firewall on End-User Devices
              Description: Implement and manage a host-based firewall or port-filtering tool on end-user devices, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Fail

            3.4.2.8 Ensure nftables default deny firewall policy

            Description:

            Base chain policy is the default verdict that will be applied to packets reaching the end of the chain.

            There are two policies: accept (Default) and drop. If the policy is set to accept , the firewall will accept any packet that is not configured to be denied and the packet will continue transversing the network stack.

            It is easier to white list acceptable usage than to black list unacceptable usage.

            Note: Changing firewall settings while connected over network can result in being locked out of the system.

            Run the following command for the base chains with the input, forward, and output hooks to implement a default DROP policy:

            # nft chain <table family> <table name> <chain name> { policy drop \; }

            Example:

            # nft chain inet filter input { policy drop \; }



            # nft chain inet filter forward { policy drop \; }



            # nft chain inet filter output { policy drop \; }

            Impact:

            If configuring nftables over ssh, creating a base chain with a policy of drop will cause loss of connectivity.

            Ensure that a rule allowing ssh has been added to the base chain prior to setting the base chain's policy to drop

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Complex Check
            AND
            Script: sce/nft_ruleset_drop.sh
            Result: Fail
            Exit Value: 102
            Output:
            • "input" basechain does not have a default drop policy
            Errors:
            • /root/Assessor/sce/nft_ruleset_drop.sh: line 13: nft: command not found
            Script: sce/nft_ruleset_drop.sh
            Result: Fail
            Exit Value: 102
            Output:
            • "forward" basechain does not have a default drop policy
            Errors:
            • /root/Assessor/sce/nft_ruleset_drop.sh: line 13: nft: command not found
            Script: sce/nft_ruleset_drop.sh
            Result: Fail
            Exit Value: 102
            Output:
            • "output" basechain does not have a default drop policy
            Errors:
            • /root/Assessor/sce/nft_ruleset_drop.sh: line 13: nft: command not found
            Script: sce/deb_no_nftables.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - No firewall is configured on the system
            • -- INFO --
            • - UFW is not configured
            • - NFTables is not configured
            • - IPTables is not configured
            Errors:
            • /root/Assessor/sce/deb_no_nftables.sh: line 16: ufw: command not found


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.8_Ensure_nftables_default_deny_firewall_policy"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.887-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/5"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">Manual Page nft</xccdf:ident>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CA-9, SC-7</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:complex-check operator="AND" negate="false">
                        <xccdf:check system="http://open-scap.org/page/SCE"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                               value-id="xccdf_org.cisecurity.benchmarks_value_3995307_var"/>
                           <xccdf:check-content-ref href="sce/nft_ruleset_drop.sh"/>
                           <xccdf:check-content>
                              <command_result href="sce/nft_ruleset_drop.sh"
                                              xccdf="fail"
                                              script="/root/Assessor/sce/nft_ruleset_drop.sh"
                                              exit-value="102">
                                 <out>
                                    <l>"input" basechain does not have a default drop policy</l>
                                 </out>
                                 <err>
                                    <l>/root/Assessor/sce/nft_ruleset_drop.sh: line 13: nft: command not found</l>
                                 </err>
                                 <env/>
                              </command_result>
                           </xccdf:check-content>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="sce">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Script:</td>
                                          <td>sce/nft_ruleset_drop.sh</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Exit Value:</td>
                                          <td>102</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Output:</td>
                                          <td>
                                             <ul class="unstyled">
                                                <li>"input" basechain does not have a default drop policy</li>
                                             </ul>
                                          </td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Errors:</td>
                                          <td>
                                             <ul>
                                                <li>/root/Assessor/sce/nft_ruleset_drop.sh: line 13: nft: command not found</li>
                                             </ul>
                                          </td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </evidence>
                        </xccdf:check>
                        <xccdf:check system="http://open-scap.org/page/SCE"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                               value-id="xccdf_org.cisecurity.benchmarks_value_3995309_var"/>
                           <xccdf:check-content-ref href="sce/nft_ruleset_drop.sh"/>
                           <xccdf:check-content>
                              <command_result href="sce/nft_ruleset_drop.sh"
                                              xccdf="fail"
                                              script="/root/Assessor/sce/nft_ruleset_drop.sh"
                                              exit-value="102">
                                 <out>
                                    <l>"forward" basechain does not have a default drop policy</l>
                                 </out>
                                 <err>
                                    <l>/root/Assessor/sce/nft_ruleset_drop.sh: line 13: nft: command not found</l>
                                 </err>
                                 <env/>
                              </command_result>
                           </xccdf:check-content>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="sce">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Script:</td>
                                          <td>sce/nft_ruleset_drop.sh</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Exit Value:</td>
                                          <td>102</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Output:</td>
                                          <td>
                                             <ul class="unstyled">
                                                <li>"forward" basechain does not have a default drop policy</li>
                                             </ul>
                                          </td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Errors:</td>
                                          <td>
                                             <ul>
                                                <li>/root/Assessor/sce/nft_ruleset_drop.sh: line 13: nft: command not found</li>
                                             </ul>
                                          </td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </evidence>
                        </xccdf:check>
                     </xccdf:complex-check>
                     <xccdf:check system="http://open-scap.org/page/SCE"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                            value-id="xccdf_org.cisecurity.benchmarks_value_3995311_var"/>
                        <xccdf:check-content-ref href="sce/nft_ruleset_drop.sh"/>
                        <xccdf:check-content>
                           <command_result href="sce/nft_ruleset_drop.sh"
                                           xccdf="fail"
                                           script="/root/Assessor/sce/nft_ruleset_drop.sh"
                                           exit-value="102">
                              <out>
                                 <l>"output" basechain does not have a default drop policy</l>
                              </out>
                              <err>
                                 <l>/root/Assessor/sce/nft_ruleset_drop.sh: line 13: nft: command not found</l>
                              </err>
                              <env/>
                           </command_result>
                        </xccdf:check-content>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="sce">
                              <table class="evidence-sep" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Script:</td>
                                       <td>sce/nft_ruleset_drop.sh</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Result:</td>
                                       <td class="fail">Fail</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Exit Value:</td>
                                       <td>102</td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Output:</td>
                                       <td>
                                          <ul class="unstyled">
                                             <li>"output" basechain does not have a default drop policy</li>
                                          </ul>
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Errors:</td>
                                       <td>
                                          <ul>
                                             <li>/root/Assessor/sce/nft_ruleset_drop.sh: line 13: nft: command not found</li>
                                          </ul>
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/deb_no_nftables.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/deb_no_nftables.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/deb_no_nftables.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** FAIL **</l>
                              <l> - Reason(s) for audit failure:</l>
                              <l/>
                              <l>  - No firewall is configured on the system</l>
                              <l/>
                              <l/>
                              <l>  -- INFO --</l>
                              <l/>
                              <l>  - UFW is not configured</l>
                              <l>  - NFTables is not configured</l>
                              <l>  - IPTables is not configured</l>
                              <l/>
                           </out>
                           <err>
                              <l>/root/Assessor/sce/deb_no_nftables.sh: line 16: ufw: command not found</l>
                           </err>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/deb_no_nftables.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** FAIL **</li>
                                          <li> - Reason(s) for audit failure:</li>
                                          <li/>
                                          <li>  - No firewall is configured on the system</li>
                                          <li/>
                                          <li/>
                                          <li>  -- INFO --</li>
                                          <li/>
                                          <li>  - UFW is not configured</li>
                                          <li>  - NFTables is not configured</li>
                                          <li>  - IPTables is not configured</li>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Errors:</td>
                                    <td>
                                       <ul>
                                          <li>/root/Assessor/sce/deb_no_nftables.sh: line 16: ufw: command not found</li>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: Manual Page nft
            • URL: NIST SP 800-53 Rev. 5: CA-9, SC-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.4
              Label: Apply Host-Based Firewalls or Port Filtering
              Description: Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.4
              Label: Implement and Manage a Firewall on Servers
              Description: Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent.
              Implementation Group: IG-1
              Security Function: Protect
            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.5
              Label: Implement and Manage a Firewall on End-User Devices
              Description: Implement and manage a host-based firewall or port-filtering tool on end-user devices, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Fail

            3.4.2.9 Ensure nftables service is enabled

            Description:

            The nftables service allows for the loading of nftables rulesets during boot, or starting on the nftables service

            The nftables service restores the nftables rules from the rules files referenced in the /etc/nftables.conf file during boot or the starting of the nftables service

            Run the following command to enable the nftables service:

            # systemctl enable nftables

            Show Assessment Evidence
            Complex Check
            OR
            Criterion: Ensure standard service 'nftables' is enabled
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            Systemdunitproperty Item
            Name Type Status Value
            Unit String Exists nftables
            Property String Exists UnitFileState
            Value String Exists No Value
            Script: sce/deb_no_nftables.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - No firewall is configured on the system
            • -- INFO --
            • - UFW is not configured
            • - NFTables is not configured
            • - IPTables is not configured
            Errors:
            • /root/Assessor/sce/deb_no_nftables.sh: line 16: ufw: command not found


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.9_Ensure_nftables_service_is_enabled"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.887-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/5"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CA-9, SC-7</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995316"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995316">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995316"
                                   check="all"
                                   check_existence="at_least_one_exists">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure standard service 'nftables' is enabled</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>At Least One Exists</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Systemdunitproperty Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Unit</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>nftables</td>
                                       </tr>
                                       <tr>
                                          <td>Property</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>UnitFileState</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Value</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>No Value</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/deb_no_nftables.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/deb_no_nftables.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/deb_no_nftables.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** FAIL **</l>
                              <l> - Reason(s) for audit failure:</l>
                              <l/>
                              <l>  - No firewall is configured on the system</l>
                              <l/>
                              <l/>
                              <l>  -- INFO --</l>
                              <l/>
                              <l>  - UFW is not configured</l>
                              <l>  - NFTables is not configured</l>
                              <l>  - IPTables is not configured</l>
                              <l/>
                           </out>
                           <err>
                              <l>/root/Assessor/sce/deb_no_nftables.sh: line 16: ufw: command not found</l>
                           </err>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/deb_no_nftables.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** FAIL **</li>
                                          <li> - Reason(s) for audit failure:</li>
                                          <li/>
                                          <li>  - No firewall is configured on the system</li>
                                          <li/>
                                          <li/>
                                          <li>  -- INFO --</li>
                                          <li/>
                                          <li>  - UFW is not configured</li>
                                          <li>  - NFTables is not configured</li>
                                          <li>  - IPTables is not configured</li>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Errors:</td>
                                    <td>
                                       <ul>
                                          <li>/root/Assessor/sce/deb_no_nftables.sh: line 16: ufw: command not found</li>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CA-9, SC-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.4
              Label: Apply Host-Based Firewalls or Port Filtering
              Description: Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.4
              Label: Implement and Manage a Firewall on Servers
              Description: Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent.
              Implementation Group: IG-1
              Security Function: Protect
            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.5
              Label: Implement and Manage a Firewall on End-User Devices
              Description: Implement and manage a host-based firewall or port-filtering tool on end-user devices, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Fail

            3.4.2.10 Ensure nftables rules are permanent

            Description:

            nftables is a subsystem of the Linux kernel providing filtering and classification of network packets/datagrams/frames.

            The nftables service reads the /etc/nftables.conf file for a nftables file or files to include in the nftables ruleset.

            A nftables ruleset containing the input, forward, and output base chains allow network traffic to be filtered.

            Changes made to nftables ruleset only affect the live system, you will also need to configure the nftables ruleset to apply on boot

            Edit the /etc/nftables.conf file and un-comment or add a line with include <Absolute path to nftables rules file> for each nftables file you want included in the nftables ruleset on boot

            Example:

            # vi /etc/nftables.conf

            Add the line:

            include "/etc/nftables.rules"

            Show Assessment Evidence
            Complex Check
            OR
            Criterion: Ensure at least one file named /etc/nftables.conf exists and matches pattern ^\s*include\s+\S+
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            No matching system items were found.
            Script: sce/deb_no_nftables.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - No firewall is configured on the system
            • -- INFO --
            • - UFW is not configured
            • - NFTables is not configured
            • - IPTables is not configured
            Errors:
            • /root/Assessor/sce/deb_no_nftables.sh: line 16: ufw: command not found


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.4.2.10_Ensure_nftables_rules_are_permanent"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.887-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/5"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CA-9, SC-7</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995320"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995320">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995320"
                                   check="all"
                                   check_existence="at_least_one_exists">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure at least one file named /etc/nftables.conf exists and matches pattern ^\s*include\s+\S+</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>At Least One Exists</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/deb_no_nftables.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/deb_no_nftables.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/deb_no_nftables.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** FAIL **</l>
                              <l> - Reason(s) for audit failure:</l>
                              <l/>
                              <l>  - No firewall is configured on the system</l>
                              <l/>
                              <l/>
                              <l>  -- INFO --</l>
                              <l/>
                              <l>  - UFW is not configured</l>
                              <l>  - NFTables is not configured</l>
                              <l>  - IPTables is not configured</l>
                              <l/>
                           </out>
                           <err>
                              <l>/root/Assessor/sce/deb_no_nftables.sh: line 16: ufw: command not found</l>
                           </err>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/deb_no_nftables.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** FAIL **</li>
                                          <li> - Reason(s) for audit failure:</li>
                                          <li/>
                                          <li>  - No firewall is configured on the system</li>
                                          <li/>
                                          <li/>
                                          <li>  -- INFO --</li>
                                          <li/>
                                          <li>  - UFW is not configured</li>
                                          <li>  - NFTables is not configured</li>
                                          <li>  - IPTables is not configured</li>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Errors:</td>
                                    <td>
                                       <ul>
                                          <li>/root/Assessor/sce/deb_no_nftables.sh: line 16: ufw: command not found</li>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CA-9, SC-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.4
              Label: Apply Host-Based Firewalls or Port Filtering
              Description: Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.4
              Label: Implement and Manage a Firewall on Servers
              Description: Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent.
              Implementation Group: IG-1
              Security Function: Protect
            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.5
              Label: Implement and Manage a Firewall on End-User Devices
              Description: Implement and manage a host-based firewall or port-filtering tool on end-user devices, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            3.4.3 Configure iptables

            If Uncomplicated Firewall (UFW) or nftables are being used in your environment, please follow the guidance in their respective section and pass-over the guidance in this section.

            IPtables is an application that allows a system administrator to configure the IPv4 and IPv6 tables, chains and rules provided by the Linux kernel firewall. While several methods of configuration exist this section is intended only to ensure the resulting IPtables rules are in place, not how they are configured. If IPv6 is in use in your environment, similar settings should be applied to the IP6tables as well.

            Note: Configuration of a live system's firewall directly over a remote connection will often result in being locked out

            3.4.3.1 Configure iptables software

            This section provides guidance for installing, enabling, removing, and disabling software packages necessary for using IPTables as the method for configuring and maintaining a Host Based Firewall on the system.

            Note: Using more than one method to configure and maintain a Host Based Firewall can cause unexpected results. If FirewallD or NFTables are being used for configuration and maintenance, this section should be skipped and the guidance in their respective section followed.

            Fail

            3.4.3.1.1 Ensure iptables packages are installed

            Description:

            iptables is a utility program that allows a system administrator to configure the tables provided by the Linux kernel firewall, implemented as different Netfilter modules, and the chains and rules it stores. Different kernel modules and programs are used for different protocols; iptables applies to IPv4, ip6tables to IPv6, arptables to ARP, and ebtables to Ethernet frames.

            A method of configuring and maintaining firewall rules is necessary to configure a Host Based Firewall.

            Run the following command to install iptables and iptables-persistent

            # apt install iptables iptables-persistent

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Criterion: Ensure package name equals 'iptables' is installed
            Existence Check: At Least One Exists
            Item Check: All
            Result: Pass
            Dpkginfo Item
            Name Type Status Value
            Name String Exists iptables
            Arch String Exists amd64
            Epoch String Exists (none)
            Release String Exists 3ubuntu2.1
            Version String Exists 1.8.4
            Evr Evr String Exists 0:1.8.4-3ubuntu2.1
            Criterion: Ensure package name equals 'iptables-persistent' is installed
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            No matching system items were found.
            Script: sce/deb_no_iptables.sh
            Result: Fail
            Exit Value: 102
            Output:
            • Failed:
            • UFW is not configured on the system
            • NFTables is not configured on the system
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.1.1_Ensure_iptables_packages_are_installed"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.888-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/5"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CA-9, SC-7</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995326"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995326">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995326"
                                      check="all"
                                      check_existence="at_least_one_exists">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure package name equals 'iptables' is installed</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>At Least One Exists</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <caption>Dpkginfo Item</caption>
                                       <thead>
                                          <tr>
                                             <th scope="col">Name</th>
                                             <th scope="col">Type</th>
                                             <th scope="col">Status</th>
                                             <th scope="col">Value</th>
                                          </tr>
                                       </thead>
                                       <tbody class="tbe">
                                          <tr>
                                             <td>Name</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>iptables</td>
                                          </tr>
                                          <tr>
                                             <td>Arch</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>amd64</td>
                                          </tr>
                                          <tr>
                                             <td>Epoch</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>(none)</td>
                                          </tr>
                                          <tr>
                                             <td>Release</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>3ubuntu2.1</td>
                                          </tr>
                                          <tr>
                                             <td>Version</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>1.8.4</td>
                                          </tr>
                                          <tr>
                                             <td>Evr</td>
                                             <td>Evr String</td>
                                             <td>Exists</td>
                                             <td>0:1.8.4-3ubuntu2.1</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995329"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995329">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995329"
                                      check="all"
                                      check_existence="at_least_one_exists">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure package name equals 'iptables-persistent' is installed</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>At Least One Exists</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="fail">Fail</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/deb_no_iptables.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/deb_no_iptables.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/deb_no_iptables.sh"
                                        exit-value="102">
                           <out>
                              <l>Failed: </l>
                              <l>UFW is not configured on the system</l>
                              <l>NFTables is not configured on the system</l>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/deb_no_iptables.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li>Failed: </li>
                                          <li>UFW is not configured on the system</li>
                                          <li>NFTables is not configured on the system</li>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CA-9, SC-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.4
              Label: Apply Host-Based Firewalls or Port Filtering
              Description: Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.4
              Label: Implement and Manage a Firewall on Servers
              Description: Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent.
              Implementation Group: IG-1
              Security Function: Protect
            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.5
              Label: Implement and Manage a Firewall on End-User Devices
              Description: Implement and manage a host-based firewall or port-filtering tool on end-user devices, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Pass

            3.4.3.1.2 Ensure nftables is not installed with iptables

            Description:

            nftables is a subsystem of the Linux kernel providing filtering and classification of network packets/datagrams/frames and is the successor to iptables.

            Running both iptables and nftables may lead to conflict.

            Run the following command to remove nftables :

            # apt purge nftables

            Show Assessment Evidence
            Complex Check
            OR
            Criterion: Ensure package name equals 'nftables' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Script: sce/deb_no_iptables.sh
            Result: Fail
            Exit Value: 102
            Output:
            • Failed:
            • UFW is not configured on the system
            • NFTables is not configured on the system
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.1.2_Ensure_nftables_is_not_installed_with_iptables"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.888-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/5"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CA-9, CM-7</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995333"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995333">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995333"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'nftables' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/deb_no_iptables.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/deb_no_iptables.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/deb_no_iptables.sh"
                                        exit-value="102">
                           <out>
                              <l>Failed: </l>
                              <l>UFW is not configured on the system</l>
                              <l>NFTables is not configured on the system</l>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/deb_no_iptables.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li>Failed: </li>
                                          <li>UFW is not configured on the system</li>
                                          <li>NFTables is not configured on the system</li>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CA-9, CM-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.4
              Label: Apply Host-Based Firewalls or Port Filtering
              Description: Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.4
              Label: Implement and Manage a Firewall on Servers
              Description: Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent.
              Implementation Group: IG-1
              Security Function: Protect
            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.5
              Label: Implement and Manage a Firewall on End-User Devices
              Description: Implement and manage a host-based firewall or port-filtering tool on end-user devices, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Pass

            3.4.3.1.3 Ensure ufw is uninstalled or disabled with iptables

            Description:

            Uncomplicated Firewall (UFW) is a program for managing a netfilter firewall designed to be easy to use.

            • Uses a command-line interface consisting of a small number of simple commands
            • Uses iptables for configuration

            Running iptables.persistent with ufw enabled may lead to conflict and unexpected results.

            Run one of the following commands to either remove ufw or stop and mask ufw

            Run the following command to remove ufw :

            # apt purge ufw

            -OR-

            Run the following commands to disable ufw :

            # ufw disable

            # systemctl stop ufw

            # systemctl mask ufw

            Note:ufw disable needs to be run before systemctl mask ufw in order to correctly disable UFW

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            OR
            Criterion: Ensure package name equals 'ufw' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Script: sce/ufw_disabled.sh
            Result: Pass
            Exit Value: 101
            Output:
            • UFW status is: "UFW is not installed"
            No error lines were collected.
            Script: sce/deb_no_iptables.sh
            Result: Fail
            Exit Value: 102
            Output:
            • Failed:
            • UFW is not configured on the system
            • NFTables is not configured on the system
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.1.3_Ensure_ufw_is_uninstalled_or_disabled_with_iptables"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.888-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/5"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: SC-7</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="OR" negate="false">
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995338"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995338">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995338"
                                      check="all"
                                      check_existence="none_exist">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure package name equals 'ufw' is not installed</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>None Exist</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                     <xccdf:check system="http://open-scap.org/page/SCE"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="sce/ufw_disabled.sh"/>
                        <xccdf:check-content>
                           <command_result href="sce/ufw_disabled.sh"
                                           xccdf="pass"
                                           script="/root/Assessor/sce/ufw_disabled.sh"
                                           exit-value="101">
                              <out>
                                 <l>UFW status is: "UFW is not installed"</l>
                              </out>
                              <err/>
                              <env/>
                           </command_result>
                        </xccdf:check-content>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="sce">
                              <table class="evidence-sep" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Script:</td>
                                       <td>sce/ufw_disabled.sh</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Result:</td>
                                       <td class="pass">Pass</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Exit Value:</td>
                                       <td>101</td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Output:</td>
                                       <td>
                                          <ul class="unstyled">
                                             <li>UFW status is: "UFW is not installed"</li>
                                          </ul>
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td>No error lines were collected.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/deb_no_iptables.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/deb_no_iptables.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/deb_no_iptables.sh"
                                        exit-value="102">
                           <out>
                              <l>Failed: </l>
                              <l>UFW is not configured on the system</l>
                              <l>NFTables is not configured on the system</l>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/deb_no_iptables.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li>Failed: </li>
                                          <li>UFW is not configured on the system</li>
                                          <li>NFTables is not configured on the system</li>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: SC-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.4
              Label: Apply Host-Based Firewalls or Port Filtering
              Description: Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.4
              Label: Implement and Manage a Firewall on Servers
              Description: Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent.
              Implementation Group: IG-1
              Security Function: Protect
            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.5
              Label: Implement and Manage a Firewall on End-User Devices
              Description: Implement and manage a host-based firewall or port-filtering tool on end-user devices, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            3.4.3.2 Configure IPv4 iptables

            Iptables is used to set up, maintain, and inspect the tables of IP packet filter rules in the Linux kernel. Several different tables may be defined. Each table contains a number of built-in chains and may also contain user-defined chains.

            Each chain is a list of rules which can match a set of packets. Each rule specifies what to do with a packet that matches. This is called a 'target', which may be a jump to a user-defined chain in the same table.

            Note: This section broadly assumes starting with an empty IPtables firewall ruleset (established by flushing the rules with iptables -F). Remediation steps included only affect the live system, you will also need to configure your default firewall configuration to apply on boot. Configuration of a live systems firewall directly over a remote connection will often result in being locked out. It is advised to have a known good firewall configuration set to run on boot and to configure an entire firewall structure in a script that is then run and tested before saving to boot. The following script will implement the firewall rules of this section and open port 22(ssh) from anywhere:

            #!/bin/bash



            # Flush IPtables rules

            iptables -F



            # Ensure default deny firewall policy

            iptables -P INPUT DROP

            iptables -P OUTPUT DROP

            iptables -P FORWARD DROP



            # Ensure loopback traffic is configured

            iptables -A INPUT -i lo -j ACCEPT

            iptables -A OUTPUT -o lo -j ACCEPT

            iptables -A INPUT -s 127.0.0.0/8 -j DROP



            # Ensure outbound and established connections are configured

            iptables -A OUTPUT -p tcp -m state --state NEW,ESTABLISHED -j ACCEPT

            iptables -A OUTPUT -p udp -m state --state NEW,ESTABLISHED -j ACCEPT

            iptables -A OUTPUT -p icmp -m state --state NEW,ESTABLISHED -j ACCEPT

            iptables -A INPUT -p tcp -m state --state ESTABLISHED -j ACCEPT

            iptables -A INPUT -p udp -m state --state ESTABLISHED -j ACCEPT

            iptables -A INPUT -p icmp -m state --state ESTABLISHED -j ACCEPT



            # Open inbound ssh(tcp port 22) connections

            iptables -A INPUT -p tcp --dport 22 -m state --state NEW -j ACCEPT
            Fail

            3.4.3.2.1 Ensure iptables default deny firewall policy

            Description:

            A default deny all policy on connections ensures that any unconfigured network usage will be rejected.

            Notes:

            • Changing firewall settings while connected over network can result in being locked out of the system
            • Remediation will only affect the active system firewall, be sure to configure the default policy in your firewall management to apply on boot as well

            With a default accept policy the firewall will accept any packet that is not configured to be denied. It is easier to white list acceptable usage than to black list unacceptable usage.

            Run the following commands to implement a default DROP policy:

            # iptables -P INPUT DROP

            # iptables -P OUTPUT DROP

            # iptables -P FORWARD DROP

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Complex Check
            AND
            Script: sce/iptables_chk.sh
            Result: Fail
            Exit Value: 102
            Output:
            • Missing iptables rule.
            No error lines were collected.
            Script: sce/iptables_chk.sh
            Result: Fail
            Exit Value: 102
            Output:
            • Missing iptables rule.
            No error lines were collected.
            Script: sce/iptables_chk.sh
            Result: Fail
            Exit Value: 102
            Output:
            • Missing iptables rule.
            No error lines were collected.
            Script: sce/deb_no_iptables.sh
            Result: Fail
            Exit Value: 102
            Output:
            • Failed:
            • UFW is not configured on the system
            • NFTables is not configured on the system
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.2.1_Ensure_iptables_default_deny_firewall_policy"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.889-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/5"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CA-9, SC-7</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:complex-check operator="AND" negate="false">
                        <xccdf:check system="http://open-scap.org/page/SCE"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                               value-id="xccdf_org.cisecurity.benchmarks_value_3995346_var"/>
                           <xccdf:check-content-ref href="sce/iptables_chk.sh"/>
                           <xccdf:check-content>
                              <command_result href="sce/iptables_chk.sh"
                                              xccdf="fail"
                                              script="/root/Assessor/sce/iptables_chk.sh"
                                              exit-value="102">
                                 <out>
                                    <l>Missing iptables rule.</l>
                                 </out>
                                 <err/>
                                 <env/>
                              </command_result>
                           </xccdf:check-content>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="sce">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Script:</td>
                                          <td>sce/iptables_chk.sh</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Exit Value:</td>
                                          <td>102</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Output:</td>
                                          <td>
                                             <ul class="unstyled">
                                                <li>Missing iptables rule.</li>
                                             </ul>
                                          </td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td>No error lines were collected.</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </evidence>
                        </xccdf:check>
                        <xccdf:check system="http://open-scap.org/page/SCE"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                               value-id="xccdf_org.cisecurity.benchmarks_value_3995348_var"/>
                           <xccdf:check-content-ref href="sce/iptables_chk.sh"/>
                           <xccdf:check-content>
                              <command_result href="sce/iptables_chk.sh"
                                              xccdf="fail"
                                              script="/root/Assessor/sce/iptables_chk.sh"
                                              exit-value="102">
                                 <out>
                                    <l>Missing iptables rule.</l>
                                 </out>
                                 <err/>
                                 <env/>
                              </command_result>
                           </xccdf:check-content>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="sce">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Script:</td>
                                          <td>sce/iptables_chk.sh</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Exit Value:</td>
                                          <td>102</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Output:</td>
                                          <td>
                                             <ul class="unstyled">
                                                <li>Missing iptables rule.</li>
                                             </ul>
                                          </td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td>No error lines were collected.</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </evidence>
                        </xccdf:check>
                     </xccdf:complex-check>
                     <xccdf:check system="http://open-scap.org/page/SCE"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                            value-id="xccdf_org.cisecurity.benchmarks_value_3995350_var"/>
                        <xccdf:check-content-ref href="sce/iptables_chk.sh"/>
                        <xccdf:check-content>
                           <command_result href="sce/iptables_chk.sh"
                                           xccdf="fail"
                                           script="/root/Assessor/sce/iptables_chk.sh"
                                           exit-value="102">
                              <out>
                                 <l>Missing iptables rule.</l>
                              </out>
                              <err/>
                              <env/>
                           </command_result>
                        </xccdf:check-content>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="sce">
                              <table class="evidence-sep" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Script:</td>
                                       <td>sce/iptables_chk.sh</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Result:</td>
                                       <td class="fail">Fail</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Exit Value:</td>
                                       <td>102</td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Output:</td>
                                       <td>
                                          <ul class="unstyled">
                                             <li>Missing iptables rule.</li>
                                          </ul>
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td>No error lines were collected.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/deb_no_iptables.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/deb_no_iptables.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/deb_no_iptables.sh"
                                        exit-value="102">
                           <out>
                              <l>Failed: </l>
                              <l>UFW is not configured on the system</l>
                              <l>NFTables is not configured on the system</l>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/deb_no_iptables.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li>Failed: </li>
                                          <li>UFW is not configured on the system</li>
                                          <li>NFTables is not configured on the system</li>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CA-9, SC-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.4
              Label: Apply Host-Based Firewalls or Port Filtering
              Description: Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.4
              Label: Implement and Manage a Firewall on Servers
              Description: Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent.
              Implementation Group: IG-1
              Security Function: Protect
            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.5
              Label: Implement and Manage a Firewall on End-User Devices
              Description: Implement and manage a host-based firewall or port-filtering tool on end-user devices, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Fail

            3.4.3.2.2 Ensure iptables loopback traffic is configured

            Description:

            Configure the loopback interface to accept traffic. Configure all other interfaces to deny traffic to the loopback network (127.0.0.0/8).

            Notes:

            • Changing firewall settings while connected over network can result in being locked out of the system
            • Remediation will only affect the active system firewall, be sure to configure the default policy in your firewall management to apply on boot as well

            Loopback traffic is generated between processes on machine and is typically critical to operation of the system. The loopback interface is the only place that loopback network (127.0.0.0/8) traffic should be seen, all other interfaces should ignore traffic on this network as an anti-spoofing measure.

            Run the following commands to implement the loopback rules:

            # iptables -A INPUT -i lo -j ACCEPT

            # iptables -A OUTPUT -o lo -j ACCEPT

            # iptables -A INPUT -s 127.0.0.0/8 -j DROP

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Complex Check
            AND
            Script: sce/iptables_input.sh
            Result: Fail
            Exit Value: 102
            Output:
            • Missing iptables rule.
            No error lines were collected.
            Script: sce/iptables_input.sh
            Result: Fail
            Exit Value: 102
            Output:
            • Missing iptables rule.
            No error lines were collected.
            Script: sce/iptables_output.sh
            Result: Fail
            Exit Value: 102
            Output:
            • Missing iptables rule.
            No error lines were collected.
            Script: sce/deb_no_iptables.sh
            Result: Fail
            Exit Value: 102
            Output:
            • Failed:
            • UFW is not configured on the system
            • NFTables is not configured on the system
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.2.2_Ensure_iptables_loopback_traffic_is_configured"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.889-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/5"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CA-9, SC-7</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:complex-check operator="AND" negate="false">
                        <xccdf:check system="http://open-scap.org/page/SCE"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                               value-id="xccdf_org.cisecurity.benchmarks_value_3995355_var"/>
                           <xccdf:check-content-ref href="sce/iptables_input.sh"/>
                           <xccdf:check-content>
                              <command_result href="sce/iptables_input.sh"
                                              xccdf="fail"
                                              script="/root/Assessor/sce/iptables_input.sh"
                                              exit-value="102">
                                 <out>
                                    <l>Missing iptables rule.</l>
                                 </out>
                                 <err/>
                                 <env/>
                              </command_result>
                           </xccdf:check-content>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="sce">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Script:</td>
                                          <td>sce/iptables_input.sh</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Exit Value:</td>
                                          <td>102</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Output:</td>
                                          <td>
                                             <ul class="unstyled">
                                                <li>Missing iptables rule.</li>
                                             </ul>
                                          </td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td>No error lines were collected.</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </evidence>
                        </xccdf:check>
                        <xccdf:check system="http://open-scap.org/page/SCE"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                               value-id="xccdf_org.cisecurity.benchmarks_value_3995357_var"/>
                           <xccdf:check-content-ref href="sce/iptables_input.sh"/>
                           <xccdf:check-content>
                              <command_result href="sce/iptables_input.sh"
                                              xccdf="fail"
                                              script="/root/Assessor/sce/iptables_input.sh"
                                              exit-value="102">
                                 <out>
                                    <l>Missing iptables rule.</l>
                                 </out>
                                 <err/>
                                 <env/>
                              </command_result>
                           </xccdf:check-content>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="sce">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Script:</td>
                                          <td>sce/iptables_input.sh</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Exit Value:</td>
                                          <td>102</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Output:</td>
                                          <td>
                                             <ul class="unstyled">
                                                <li>Missing iptables rule.</li>
                                             </ul>
                                          </td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td>No error lines were collected.</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </evidence>
                        </xccdf:check>
                     </xccdf:complex-check>
                     <xccdf:check system="http://open-scap.org/page/SCE"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                            value-id="xccdf_org.cisecurity.benchmarks_value_3995359_var"/>
                        <xccdf:check-content-ref href="sce/iptables_output.sh"/>
                        <xccdf:check-content>
                           <command_result href="sce/iptables_output.sh"
                                           xccdf="fail"
                                           script="/root/Assessor/sce/iptables_output.sh"
                                           exit-value="102">
                              <out>
                                 <l>Missing iptables rule.</l>
                              </out>
                              <err/>
                              <env/>
                           </command_result>
                        </xccdf:check-content>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="sce">
                              <table class="evidence-sep" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Script:</td>
                                       <td>sce/iptables_output.sh</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Result:</td>
                                       <td class="fail">Fail</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Exit Value:</td>
                                       <td>102</td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Output:</td>
                                       <td>
                                          <ul class="unstyled">
                                             <li>Missing iptables rule.</li>
                                          </ul>
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td>No error lines were collected.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/deb_no_iptables.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/deb_no_iptables.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/deb_no_iptables.sh"
                                        exit-value="102">
                           <out>
                              <l>Failed: </l>
                              <l>UFW is not configured on the system</l>
                              <l>NFTables is not configured on the system</l>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/deb_no_iptables.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li>Failed: </li>
                                          <li>UFW is not configured on the system</li>
                                          <li>NFTables is not configured on the system</li>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CA-9, SC-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.4
              Label: Apply Host-Based Firewalls or Port Filtering
              Description: Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.4
              Label: Implement and Manage a Firewall on Servers
              Description: Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent.
              Implementation Group: IG-1
              Security Function: Protect
            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.5
              Label: Implement and Manage a Firewall on End-User Devices
              Description: Implement and manage a host-based firewall or port-filtering tool on end-user devices, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Manual

            3.4.3.2.3 Ensure iptables outbound and established connections are configured

            Description:

            Configure the firewall rules for new outbound, and established connections.

            Notes:

            • Changing firewall settings while connected over network can result in being locked out of the system
            • Remediation will only affect the active system firewall, be sure to configure the default policy in your firewall management to apply on boot as well

            If rules are not in place for new outbound, and established connections all packets will be dropped by the default policy preventing network usage.

            Configure iptables in accordance with site policy. The following commands will implement a policy to allow all outbound connections and all established connections:

            # iptables -A OUTPUT -p tcp -m state --state NEW,ESTABLISHED -j ACCEPT

            # iptables -A OUTPUT -p udp -m state --state NEW,ESTABLISHED -j ACCEPT

            # iptables -A OUTPUT -p icmp -m state --state NEW,ESTABLISHED -j ACCEPT

            # iptables -A INPUT -p tcp -m state --state ESTABLISHED -j ACCEPT

            # iptables -A INPUT -p udp -m state --state ESTABLISHED -j ACCEPT

            # iptables -A INPUT -p icmp -m state --state ESTABLISHED -j ACCEPT



            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.2.3_Ensure_iptables_outbound_and_established_connections_are_configured"
                               role="unscored"
                               severity="unknown"
                               time="2024-04-14T23:46:23.889-04:00"
                               version="1"
                               weight="0.0">
               <xccdf:result>notchecked</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/5"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CA-9, SC-7</xccdf:ident>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CA-9, SC-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.4
              Label: Apply Host-Based Firewalls or Port Filtering
              Description: Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.4
              Label: Implement and Manage a Firewall on Servers
              Description: Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent.
              Implementation Group: IG-1
              Security Function: Protect
            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.5
              Label: Implement and Manage a Firewall on End-User Devices
              Description: Implement and manage a host-based firewall or port-filtering tool on end-user devices, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Fail

            3.4.3.2.4 Ensure iptables firewall rules exist for all open ports

            Description:

            Any ports that have been opened on non-loopback addresses need firewall rules to govern traffic.

            Note:

            • Changing firewall settings while connected over network can result in being locked out of the system
            • Remediation will only affect the active system firewall, be sure to configure the default policy in your firewall management to apply on boot as well
            • The remediation command opens up the port to traffic from all sources. Consult iptables documentation and set any restrictions in compliance with site policy

            Without a firewall rule configured for open ports default firewall policy will drop all packets to these ports.

            For each port identified in the audit which does not have a firewall rule establish a proper rule for accepting inbound connections:

            # iptables -A INPUT -p <protocol> --dport <port> -m state --state NEW -j ACCEPT

            Show Assessment Evidence
            Complex Check
            OR
            Script: sce/nix_iptables_openports_chk.sh
            Result: Fail
            Exit Value: 102
            Output:
            • FAILED: The following open port(s) dont have a firewall rule: "8472", "38766", "2379", "2380", "39791", "8080", "22", "8001"
            No error lines were collected.
            Script: sce/deb_no_iptables.sh
            Result: Fail
            Exit Value: 102
            Output:
            • Failed:
            • UFW is not configured on the system
            • NFTables is not configured on the system
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.2.4_Ensure_iptables_firewall_rules_exist_for_all_open_ports"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.889-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/5"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CA-9, SC-7</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/nix_iptables_openports_chk.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/nix_iptables_openports_chk.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/nix_iptables_openports_chk.sh"
                                        exit-value="102">
                           <out>
                              <l>FAILED: The following open port(s) dont have a firewall rule: "8472", "38766", "2379", "2380", "39791", "8080", "22", "8001"</l>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/nix_iptables_openports_chk.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li>FAILED: The following open port(s) dont have a firewall rule: "8472", "38766", "2379", "2380", "39791", "8080", "22", "8001"</li>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/deb_no_iptables.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/deb_no_iptables.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/deb_no_iptables.sh"
                                        exit-value="102">
                           <out>
                              <l>Failed: </l>
                              <l>UFW is not configured on the system</l>
                              <l>NFTables is not configured on the system</l>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/deb_no_iptables.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li>Failed: </li>
                                          <li>UFW is not configured on the system</li>
                                          <li>NFTables is not configured on the system</li>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CA-9, SC-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.4
              Label: Apply Host-Based Firewalls or Port Filtering
              Description: Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.4
              Label: Implement and Manage a Firewall on Servers
              Description: Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent.
              Implementation Group: IG-1
              Security Function: Protect
            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.5
              Label: Implement and Manage a Firewall on End-User Devices
              Description: Implement and manage a host-based firewall or port-filtering tool on end-user devices, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            3.4.3.3 Configure IPv6 ip6tables

            Ip6tables is used to set up, maintain, and inspect the tables of IPv6 packet filter rules in the Linux kernel. Several different tables may be defined. Each table contains a number of built-in chains and may also contain user-defined chains. Each chain is a list of rules which can match a set of packets. Each rule specifies what to do with a packet that matches. This is called a `target', which may be a jump to a user-defined chain in the same table.

            If IPv6 in enabled on the system, the ip6tables should be configured.

            Note: This section broadly assumes starting with an empty ip6tables firewall ruleset (established by flushing the rules with ip6tables -F). Remediation steps included only affect the live system, you will also need to configure your default firewall configuration to apply on boot. Configuration of a live systems firewall directly over a remote connection will often result in being locked out. It is advised to have a known good firewall configuration set to run on boot and to configure an entire firewall structure in a script that is then run and tested before saving to boot.

            The following script will implement the firewall rules of this section and open port 22(ssh) from anywhere:

            #!/bin/bash



            # Flush ip6tables rules

            ip6tables -F



            # Ensure default deny firewall policy

            ip6tables -P INPUT DROP

            ip6tables -P OUTPUT DROP

            ip6tables -P FORWARD DROP



            # Ensure loopback traffic is configured

            ip6tables -A INPUT -i lo -j ACCEPT

            ip6tables -A OUTPUT -o lo -j ACCEPT

            ip6tables -A INPUT -s ::1 -j DROP



            # Ensure outbound and established connections are configured

            ip6tables -A OUTPUT -p tcp -m state --state NEW,ESTABLISHED -j ACCEPT

            ip6tables -A OUTPUT -p udp -m state --state NEW,ESTABLISHED -j ACCEPT

            ip6tables -A OUTPUT -p icmp -m state --state NEW,ESTABLISHED -j ACCEPT

            ip6tables -A INPUT -p tcp -m state --state ESTABLISHED -j ACCEPT

            ip6tables -A INPUT -p udp -m state --state ESTABLISHED -j ACCEPT

            ip6tables -A INPUT -p icmp -m state --state ESTABLISHED -j ACCEPT



            # Open inbound ssh(tcp port 22) connections

            ip6tables -A INPUT -p tcp --dport 22 -m state --state NEW -j ACCEPT
            Fail

            3.4.3.3.1 Ensure ip6tables default deny firewall policy

            Description:

            A default deny all policy on connections ensures that any unconfigured network usage will be rejected.

            Note:

            • Changing firewall settings while connected over network can result in being locked out of the system
            • Remediation will only affect the active system firewall, be sure to configure the default policy in your firewall management to apply on boot as well

            With a default accept policy the firewall will accept any packet that is not configured to be denied. It is easier to white list acceptable usage than to black list unacceptable usage.

            IF IPv6 is enabled on your system:

            Run the following commands to implement a default DROP policy:

            # ip6tables -P INPUT DROP

            # ip6tables -P OUTPUT DROP

            # ip6tables -P FORWARD DROP

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            OR
            Complex Check
            AND
            Complex Check
            AND
            Script: sce/ip6tables_chk.sh
            Result: Fail
            Exit Value: 102
            Output:
            • Missing ip6tables rule.
            No error lines were collected.
            Script: sce/ip6tables_chk.sh
            Result: Fail
            Exit Value: 102
            Output:
            • Missing ip6tables rule.
            No error lines were collected.
            Script: sce/ip6tables_chk.sh
            Result: Fail
            Exit Value: 102
            Output:
            • Missing ip6tables rule.
            No error lines were collected.
            Script: sce/nix_ipv6_disabled_chk.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Results:
            • ** Fail **
            • - IPv6 is enabled on the system
            No error lines were collected.
            Script: sce/deb_no_iptables.sh
            Result: Fail
            Exit Value: 102
            Output:
            • Failed:
            • UFW is not configured on the system
            • NFTables is not configured on the system
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.3.1_Ensure_ip6tables_default_deny_firewall_policy"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.890-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/5"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CA-9, SC-7</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="OR" negate="false">
                     <xccdf:complex-check operator="AND" negate="false">
                        <xccdf:complex-check operator="AND" negate="false">
                           <xccdf:check system="http://open-scap.org/page/SCE"
                                        negate="false"
                                        multi-check="false">
                              <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                                  value-id="xccdf_org.cisecurity.benchmarks_value_3995369_var"/>
                              <xccdf:check-content-ref href="sce/ip6tables_chk.sh"/>
                              <xccdf:check-content>
                                 <command_result href="sce/ip6tables_chk.sh"
                                                 xccdf="fail"
                                                 script="/root/Assessor/sce/ip6tables_chk.sh"
                                                 exit-value="102">
                                    <out>
                                       <l>Missing ip6tables rule.</l>
                                    </out>
                                    <err/>
                                    <env/>
                                 </command_result>
                              </xccdf:check-content>
                              <evidence xmlns="http://cisecurity.org/evidence">
                                 <div class="sce">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Script:</td>
                                             <td>sce/ip6tables_chk.sh</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="fail">Fail</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Exit Value:</td>
                                             <td>102</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Output:</td>
                                             <td>
                                                <ul class="unstyled">
                                                   <li>Missing ip6tables rule.</li>
                                                </ul>
                                             </td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td>No error lines were collected.</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                 </div>
                              </evidence>
                           </xccdf:check>
                           <xccdf:check system="http://open-scap.org/page/SCE"
                                        negate="false"
                                        multi-check="false">
                              <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                                  value-id="xccdf_org.cisecurity.benchmarks_value_3995371_var"/>
                              <xccdf:check-content-ref href="sce/ip6tables_chk.sh"/>
                              <xccdf:check-content>
                                 <command_result href="sce/ip6tables_chk.sh"
                                                 xccdf="fail"
                                                 script="/root/Assessor/sce/ip6tables_chk.sh"
                                                 exit-value="102">
                                    <out>
                                       <l>Missing ip6tables rule.</l>
                                    </out>
                                    <err/>
                                    <env/>
                                 </command_result>
                              </xccdf:check-content>
                              <evidence xmlns="http://cisecurity.org/evidence">
                                 <div class="sce">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Script:</td>
                                             <td>sce/ip6tables_chk.sh</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="fail">Fail</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Exit Value:</td>
                                             <td>102</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Output:</td>
                                             <td>
                                                <ul class="unstyled">
                                                   <li>Missing ip6tables rule.</li>
                                                </ul>
                                             </td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td>No error lines were collected.</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                 </div>
                              </evidence>
                           </xccdf:check>
                        </xccdf:complex-check>
                        <xccdf:check system="http://open-scap.org/page/SCE"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                               value-id="xccdf_org.cisecurity.benchmarks_value_3995373_var"/>
                           <xccdf:check-content-ref href="sce/ip6tables_chk.sh"/>
                           <xccdf:check-content>
                              <command_result href="sce/ip6tables_chk.sh"
                                              xccdf="fail"
                                              script="/root/Assessor/sce/ip6tables_chk.sh"
                                              exit-value="102">
                                 <out>
                                    <l>Missing ip6tables rule.</l>
                                 </out>
                                 <err/>
                                 <env/>
                              </command_result>
                           </xccdf:check-content>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="sce">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Script:</td>
                                          <td>sce/ip6tables_chk.sh</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Exit Value:</td>
                                          <td>102</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Output:</td>
                                          <td>
                                             <ul class="unstyled">
                                                <li>Missing ip6tables rule.</li>
                                             </ul>
                                          </td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td>No error lines were collected.</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </evidence>
                        </xccdf:check>
                     </xccdf:complex-check>
                     <xccdf:check system="http://open-scap.org/page/SCE"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="sce/nix_ipv6_disabled_chk.sh"/>
                        <xccdf:check-content>
                           <command_result href="sce/nix_ipv6_disabled_chk.sh"
                                           xccdf="fail"
                                           script="/root/Assessor/sce/nix_ipv6_disabled_chk.sh"
                                           exit-value="102">
                              <out>
                                 <l/>
                                 <l>- Audit Results:</l>
                                 <l> ** Fail **</l>
                                 <l> - IPv6 is enabled on the system</l>
                              </out>
                              <err/>
                              <env/>
                           </command_result>
                        </xccdf:check-content>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="sce">
                              <table class="evidence-sep" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Script:</td>
                                       <td>sce/nix_ipv6_disabled_chk.sh</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Result:</td>
                                       <td class="fail">Fail</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Exit Value:</td>
                                       <td>102</td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Output:</td>
                                       <td>
                                          <ul class="unstyled">
                                             <li/>
                                             <li>- Audit Results:</li>
                                             <li> ** Fail **</li>
                                             <li> - IPv6 is enabled on the system</li>
                                          </ul>
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td>No error lines were collected.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/deb_no_iptables.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/deb_no_iptables.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/deb_no_iptables.sh"
                                        exit-value="102">
                           <out>
                              <l>Failed: </l>
                              <l>UFW is not configured on the system</l>
                              <l>NFTables is not configured on the system</l>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/deb_no_iptables.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li>Failed: </li>
                                          <li>UFW is not configured on the system</li>
                                          <li>NFTables is not configured on the system</li>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CA-9, SC-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.4
              Label: Apply Host-Based Firewalls or Port Filtering
              Description: Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.4
              Label: Implement and Manage a Firewall on Servers
              Description: Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent.
              Implementation Group: IG-1
              Security Function: Protect
            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.5
              Label: Implement and Manage a Firewall on End-User Devices
              Description: Implement and manage a host-based firewall or port-filtering tool on end-user devices, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Pass

            3.4.3.3.2 Ensure ip6tables loopback traffic is configured

            Description:

            Configure the loopback interface to accept traffic. Configure all other interfaces to deny traffic to the loopback network (::1).

            Note:

            • Changing firewall settings while connected over network can result in being locked out of the system
            • Remediation will only affect the active system firewall, be sure to configure the default policy in your firewall management to apply on boot as well

            Loopback traffic is generated between processes on machine and is typically critical to operation of the system. The loopback interface is the only place that loopback network (::1) traffic should be seen, all other interfaces should ignore traffic on this network as an anti-spoofing measure.

            Run the following commands to implement the loopback rules:

            # ip6tables -A INPUT -i lo -j ACCEPT

            # ip6tables -A OUTPUT -o lo -j ACCEPT

            # ip6tables -A INPUT -s ::1 -j DROP

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            OR
            Script: sce/iptv6_loopback.sh
            Result: Pass
            Exit Value: 101
            No output lines were collected.
            Errors:
            • grep: /boot/grub/grub.cfg: No such file or directory
            Script: sce/deb_no_iptables.sh
            Result: Fail
            Exit Value: 102
            Output:
            • Failed:
            • UFW is not configured on the system
            • NFTables is not configured on the system
            No error lines were collected.
            Script: sce/nix_ipv6_disabled_chk.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Results:
            • ** Fail **
            • - IPv6 is enabled on the system
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.3.2_Ensure_ip6tables_loopback_traffic_is_configured"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.890-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/5"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CA-9, SC-7</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="OR" negate="false">
                     <xccdf:check system="http://open-scap.org/page/SCE"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="sce/iptv6_loopback.sh"/>
                        <xccdf:check-content>
                           <command_result href="sce/iptv6_loopback.sh"
                                           xccdf="pass"
                                           script="/root/Assessor/sce/iptv6_loopback.sh"
                                           exit-value="101">
                              <out/>
                              <err>
                                 <l>grep: /boot/grub/grub.cfg: No such file or directory</l>
                              </err>
                              <env/>
                           </command_result>
                        </xccdf:check-content>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="sce">
                              <table class="evidence-sep" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Script:</td>
                                       <td>sce/iptv6_loopback.sh</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Result:</td>
                                       <td class="pass">Pass</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Exit Value:</td>
                                       <td>101</td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td>No output lines were collected.</td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Errors:</td>
                                       <td>
                                          <ul>
                                             <li>grep: /boot/grub/grub.cfg: No such file or directory</li>
                                          </ul>
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </evidence>
                     </xccdf:check>
                     <xccdf:check system="http://open-scap.org/page/SCE"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="sce/deb_no_iptables.sh"/>
                        <xccdf:check-content>
                           <command_result href="sce/deb_no_iptables.sh"
                                           xccdf="fail"
                                           script="/root/Assessor/sce/deb_no_iptables.sh"
                                           exit-value="102">
                              <out>
                                 <l>Failed: </l>
                                 <l>UFW is not configured on the system</l>
                                 <l>NFTables is not configured on the system</l>
                              </out>
                              <err/>
                              <env/>
                           </command_result>
                        </xccdf:check-content>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="sce">
                              <table class="evidence-sep" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Script:</td>
                                       <td>sce/deb_no_iptables.sh</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Result:</td>
                                       <td class="fail">Fail</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Exit Value:</td>
                                       <td>102</td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Output:</td>
                                       <td>
                                          <ul class="unstyled">
                                             <li>Failed: </li>
                                             <li>UFW is not configured on the system</li>
                                             <li>NFTables is not configured on the system</li>
                                          </ul>
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td>No error lines were collected.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/nix_ipv6_disabled_chk.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/nix_ipv6_disabled_chk.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/nix_ipv6_disabled_chk.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Results:</l>
                              <l> ** Fail **</l>
                              <l> - IPv6 is enabled on the system</l>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/nix_ipv6_disabled_chk.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Results:</li>
                                          <li> ** Fail **</li>
                                          <li> - IPv6 is enabled on the system</li>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CA-9, SC-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.4
              Label: Apply Host-Based Firewalls or Port Filtering
              Description: Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.4
              Label: Implement and Manage a Firewall on Servers
              Description: Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent.
              Implementation Group: IG-1
              Security Function: Protect
            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.5
              Label: Implement and Manage a Firewall on End-User Devices
              Description: Implement and manage a host-based firewall or port-filtering tool on end-user devices, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Manual

            3.4.3.3.3 Ensure ip6tables outbound and established connections are configured

            Description:

            Configure the firewall rules for new outbound, and established IPv6 connections.

            Note:

            • Changing firewall settings while connected over network can result in being locked out of the system
            • Remediation will only affect the active system firewall, be sure to configure the default policy in your firewall management to apply on boot as well

            If rules are not in place for new outbound, and established connections all packets will be dropped by the default policy preventing network usage.

            Configure iptables in accordance with site policy. The following commands will implement a policy to allow all outbound connections and all established connections:

            # ip6tables -A OUTPUT -p tcp -m state --state NEW,ESTABLISHED -j ACCEPT

            # ip6tables -A OUTPUT -p udp -m state --state NEW,ESTABLISHED -j ACCEPT

            # ip6tables -A OUTPUT -p icmp -m state --state NEW,ESTABLISHED -j ACCEPT

            # ip6tables -A INPUT -p tcp -m state --state ESTABLISHED -j ACCEPT

            # ip6tables -A INPUT -p udp -m state --state ESTABLISHED -j ACCEPT

            # ip6tables -A INPUT -p icmp -m state --state ESTABLISHED -j ACCEPT



            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.3.3_Ensure_ip6tables_outbound_and_established_connections_are_configured"
                               role="unscored"
                               severity="unknown"
                               time="2024-04-14T23:46:23.890-04:00"
                               version="1"
                               weight="0.0">
               <xccdf:result>notchecked</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/5"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CA-9, SC-7</xccdf:ident>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CA-9, SC-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.4
              Label: Apply Host-Based Firewalls or Port Filtering
              Description: Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.4
              Label: Implement and Manage a Firewall on Servers
              Description: Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent.
              Implementation Group: IG-1
              Security Function: Protect
            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.5
              Label: Implement and Manage a Firewall on End-User Devices
              Description: Implement and manage a host-based firewall or port-filtering tool on end-user devices, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Fail

            3.4.3.3.4 Ensure ip6tables firewall rules exist for all open ports

            Description:

            Any ports that have been opened on non-loopback addresses need firewall rules to govern traffic.

            Note:

            • Changing firewall settings while connected over network can result in being locked out of the system
            • Remediation will only affect the active system firewall, be sure to configure the default policy in your firewall management to apply on boot as well
            • The remediation command opens up the port to traffic from all sources. Consult iptables documentation and set any restrictions in compliance with site policy

            Without a firewall rule configured for open ports default firewall policy will drop all packets to these ports.

            For each port identified in the audit which does not have a firewall rule establish a proper rule for accepting inbound connections:

            # ip6tables -A INPUT -p <protocol> --dport <port> -m state --state NEW -j ACCEPT

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            OR
            Script: sce/nix_ip6tables_openports_chk.sh
            Result: Fail
            Exit Value: 102
            Output:
            • FAILED: The following open port(s) dont have a firewall rule: "10250", "6443", "10256", "22", "8888"
            No error lines were collected.
            Script: sce/nix_ipv6_disabled_chk.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Results:
            • ** Fail **
            • - IPv6 is enabled on the system
            No error lines were collected.
            Script: sce/deb_no_iptables.sh
            Result: Fail
            Exit Value: 102
            Output:
            • Failed:
            • UFW is not configured on the system
            • NFTables is not configured on the system
            No error lines were collected.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_3.4.3.3.4_Ensure_ip6tables_firewall_rules_exist_for_all_open_ports"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.890-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/5"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CA-9, SC-7</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="OR" negate="false">
                     <xccdf:check system="http://open-scap.org/page/SCE"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="sce/nix_ip6tables_openports_chk.sh"/>
                        <xccdf:check-content>
                           <command_result href="sce/nix_ip6tables_openports_chk.sh"
                                           xccdf="fail"
                                           script="/root/Assessor/sce/nix_ip6tables_openports_chk.sh"
                                           exit-value="102">
                              <out>
                                 <l>FAILED: The following open port(s) dont have a firewall rule: "10250", "6443", "10256", "22", "8888"</l>
                              </out>
                              <err/>
                              <env/>
                           </command_result>
                        </xccdf:check-content>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="sce">
                              <table class="evidence-sep" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Script:</td>
                                       <td>sce/nix_ip6tables_openports_chk.sh</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Result:</td>
                                       <td class="fail">Fail</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Exit Value:</td>
                                       <td>102</td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Output:</td>
                                       <td>
                                          <ul class="unstyled">
                                             <li>FAILED: The following open port(s) dont have a firewall rule: "10250", "6443", "10256", "22", "8888"</li>
                                          </ul>
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td>No error lines were collected.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </evidence>
                     </xccdf:check>
                     <xccdf:check system="http://open-scap.org/page/SCE"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="sce/nix_ipv6_disabled_chk.sh"/>
                        <xccdf:check-content>
                           <command_result href="sce/nix_ipv6_disabled_chk.sh"
                                           xccdf="fail"
                                           script="/root/Assessor/sce/nix_ipv6_disabled_chk.sh"
                                           exit-value="102">
                              <out>
                                 <l/>
                                 <l>- Audit Results:</l>
                                 <l> ** Fail **</l>
                                 <l> - IPv6 is enabled on the system</l>
                              </out>
                              <err/>
                              <env/>
                           </command_result>
                        </xccdf:check-content>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="sce">
                              <table class="evidence-sep" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Script:</td>
                                       <td>sce/nix_ipv6_disabled_chk.sh</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Result:</td>
                                       <td class="fail">Fail</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Exit Value:</td>
                                       <td>102</td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Output:</td>
                                       <td>
                                          <ul class="unstyled">
                                             <li/>
                                             <li>- Audit Results:</li>
                                             <li> ** Fail **</li>
                                             <li> - IPv6 is enabled on the system</li>
                                          </ul>
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td>No error lines were collected.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/deb_no_iptables.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/deb_no_iptables.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/deb_no_iptables.sh"
                                        exit-value="102">
                           <out>
                              <l>Failed: </l>
                              <l>UFW is not configured on the system</l>
                              <l>NFTables is not configured on the system</l>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/deb_no_iptables.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li>Failed: </li>
                                          <li>UFW is not configured on the system</li>
                                          <li>NFTables is not configured on the system</li>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CA-9, SC-7

            CIS Controls V7.0:

            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
              CIS Control Information
              Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
              Subcontrol: 9.4
              Label: Apply Host-Based Firewalls or Port Filtering
              Description: Apply host-based firewalls or port filtering tools on end systems, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.4
              Label: Implement and Manage a Firewall on Servers
              Description: Implement and manage a firewall on servers, where supported. Example implementations include a virtual firewall, operating system firewall, or a third-party firewall agent.
              Implementation Group: IG-1
              Security Function: Protect
            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.5
              Label: Implement and Manage a Firewall on End-User Devices
              Description: Implement and manage a host-based firewall or port-filtering tool on end-user devices, with a default-deny rule that drops all traffic except those services and ports that are explicitly allowed.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            4 Access, Authentication and Authorization

            4.1 Configure time-based job schedulers

            cron is a time-based job scheduler used to schedule jobs, commands or shell scripts, to run periodically at fixed times, dates, or intervals.

            at provides the ability to execute a command or shell script at a specified date and hour, or after a given interval of time.

            Notes:

            • Other methods exist for scheduling jobs, such as systemd timers . If another method is used, it should be secured in accordance with local site policy
            • systemd timers are systemd unit files whose name ends in .timer that control .service files or events
              • Timers can be used as an alternative to cron and at
              • Timers have built-in support for calendar time events, monotonic time events, and can be run asynchronously
            • If cron and at are not installed, this section can be skipped
            Pass

            4.1.1 Ensure cron daemon is enabled and active

            Description:

            The cron daemon is used to execute batch jobs on the system.

            Note: Other methods, such as systemd timers , exist for scheduling jobs. If another method is used, cron should be removed, and the alternate method should be secured in accordance with local site policy

            While there may not be user jobs that need to be run on the system, the system does have maintenance jobs that may include security monitoring that have to run, and cron is used to execute them.

            Run the following command to enable and start cron :

            # systemctl unmask cron

            # systemctl --now enable cron

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Criterion: Ensure systemd 'cron.service' unit 'UnitFileState' property equals 'enabled'
            Existence Check: At Least One Exists
            Item Check: All
            Result: Pass
            Systemdunitproperty Item
            Name Type Status Value
            Unit String Exists cron.service
            Property String Exists UnitFileState
            Value String Exists enabled
            Criterion: Ensure systemd 'cron.service' unit 'ActiveState' property equals 'active'
            Existence Check: At Least One Exists
            Item Check: All
            Result: Pass
            Systemdunitproperty Item
            Name Type Status Value
            Unit String Exists cron.service
            Property String Exists ActiveState
            Value String Exists active
            Criterion: Ensure package name equals 'cron' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Fail
            Dpkginfo Item
            Name Type Status Value
            Name String Exists cron
            Arch String Exists amd64
            Epoch String Exists (none)
            Release String Exists 136ubuntu1
            Version String Exists 3.0pl1
            Evr Evr String Exists 0:3.0pl1-136ubuntu1


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.1.1_Ensure_cron_daemon_is_enabled_and_active"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.890-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-export export-name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3994989"
                                            value-id="xccdf_org.cisecurity.benchmarks_value_3994989_var"/>
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994989"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994989">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994989"
                                      check="all"
                                      check_existence="at_least_one_exists">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure systemd 'cron.service' unit 'UnitFileState' property equals 'enabled'</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>At Least One Exists</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <caption>Systemdunitproperty Item</caption>
                                       <thead>
                                          <tr>
                                             <th scope="col">Name</th>
                                             <th scope="col">Type</th>
                                             <th scope="col">Status</th>
                                             <th scope="col">Value</th>
                                          </tr>
                                       </thead>
                                       <tbody class="tbe">
                                          <tr>
                                             <td>Unit</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>cron.service</td>
                                          </tr>
                                          <tr>
                                             <td>Property</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>UnitFileState</td>
                                          </tr>
                                          <tr class="evaluated">
                                             <td>Value</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>enabled</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-export export-name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3994996"
                                            value-id="xccdf_org.cisecurity.benchmarks_value_3994996_var"/>
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994996"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994996">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994996"
                                      check="all"
                                      check_existence="at_least_one_exists">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure systemd 'cron.service' unit 'ActiveState' property equals 'active'</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>At Least One Exists</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <caption>Systemdunitproperty Item</caption>
                                       <thead>
                                          <tr>
                                             <th scope="col">Name</th>
                                             <th scope="col">Type</th>
                                             <th scope="col">Status</th>
                                             <th scope="col">Value</th>
                                          </tr>
                                       </thead>
                                       <tbody class="tbe">
                                          <tr>
                                             <td>Unit</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>cron.service</td>
                                          </tr>
                                          <tr>
                                             <td>Property</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>ActiveState</td>
                                          </tr>
                                          <tr class="evaluated">
                                             <td>Value</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>active</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994992"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994992">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994992"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'cron' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Dpkginfo Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Name</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>cron</td>
                                       </tr>
                                       <tr>
                                          <td>Arch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>amd64</td>
                                       </tr>
                                       <tr>
                                          <td>Epoch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>(none)</td>
                                       </tr>
                                       <tr>
                                          <td>Release</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>136ubuntu1</td>
                                       </tr>
                                       <tr>
                                          <td>Version</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>3.0pl1</td>
                                       </tr>
                                       <tr>
                                          <td>Evr</td>
                                          <td>Evr String</td>
                                          <td>Exists</td>
                                          <td>0:3.0pl1-136ubuntu1</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5

            Fail

            4.1.2 Ensure permissions on /etc/crontab are configured

            Description:

            The /etc/crontab file is used by cron to control its own jobs. The commands in this item make sure that root is the user and group owner of the file and that only the owner can access the file.

            Note: Other methods, such as systemd timers , exist for scheduling jobs. If another method is used, cron should be removed, and the alternate method should be secured in accordance with local site policy

            This file contains information on what system jobs are run by cron. Write access to these files could provide unprivileged users with the ability to elevate their privileges. Read access to these files could provide users with the ability to gain insight on system jobs that run on the system and could provide them a way to gain unauthorized privileged access.

            Run the following commands to set ownership and permissions on /etc/crontab :

            # chown root:root /etc/crontab

            # chmod og-rwx /etc/crontab

            Show Assessment Evidence
            Complex Check
            OR
            Criterion: Ensure at least one file named /etc/crontab exists and is owned by 0:0 and does not have permissions ---rwxrwx
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            File Item
            Name Type Status Value
            Filepath String Exists /etc/crontab
            Path String Exists /etc
            Filename String Exists crontab
            Type String Exists regular
            Group Id Int Exists 1001
            User Id Int Exists 1001
            A Time Int Exists 1581626682
            C Time Int Exists 1713148761
            M Time Int Exists 1581626682
            Size Int Exists 1042
            Suid Int Exists false
            Sgid Boolean Exists false
            Sticky Boolean Exists false
            Uread Boolean Exists true
            Uwrite Boolean Exists true
            Uexec Boolean Exists false
            Gread Boolean Exists true
            Gwrite Boolean Exists false
            Gexec Boolean Exists false
            Oread Boolean Exists true
            Owrite Boolean Exists false
            Oexec Boolean Exists false
            Has Extended Acl Boolean Not collected No Value
            Criterion: Ensure package name equals 'cron' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Fail
            Dpkginfo Item
            Name Type Status Value
            Name String Exists cron
            Arch String Exists amd64
            Epoch String Exists (none)
            Release String Exists 136ubuntu1
            Version String Exists 3.0pl1
            Evr Evr String Exists 0:3.0pl1-136ubuntu1


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.1.2_Ensure_permissions_on_etccrontab_are_configured"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.890-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3, MP-2</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994999"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994999">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994999"
                                   check="all"
                                   check_existence="at_least_one_exists">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure at least one file named /etc/crontab exists and is owned by 0:0 and does not have permissions ---rwxrwx</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>At Least One Exists</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>File Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Filepath</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>/etc/crontab</td>
                                       </tr>
                                       <tr>
                                          <td>Path</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>/etc</td>
                                       </tr>
                                       <tr>
                                          <td>Filename</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>crontab</td>
                                       </tr>
                                       <tr>
                                          <td>Type</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>regular</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Group Id</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>1001</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>User Id</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>1001</td>
                                       </tr>
                                       <tr>
                                          <td>A Time</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>1581626682</td>
                                       </tr>
                                       <tr>
                                          <td>C Time</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>1713148761</td>
                                       </tr>
                                       <tr>
                                          <td>M Time</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>1581626682</td>
                                       </tr>
                                       <tr>
                                          <td>Size</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>1042</td>
                                       </tr>
                                       <tr>
                                          <td>Suid</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>false</td>
                                       </tr>
                                       <tr>
                                          <td>Sgid</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>false</td>
                                       </tr>
                                       <tr>
                                          <td>Sticky</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>false</td>
                                       </tr>
                                       <tr>
                                          <td>Uread</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr>
                                          <td>Uwrite</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr>
                                          <td>Uexec</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>false</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Gread</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Gwrite</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>false</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Gexec</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>false</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Oread</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Owrite</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>false</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Oexec</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>false</td>
                                       </tr>
                                       <tr>
                                          <td>Has Extended Acl</td>
                                          <td>Boolean</td>
                                          <td>Not collected</td>
                                          <td>No Value</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995004"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995004">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995004"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'cron' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Dpkginfo Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Name</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>cron</td>
                                       </tr>
                                       <tr>
                                          <td>Arch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>amd64</td>
                                       </tr>
                                       <tr>
                                          <td>Epoch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>(none)</td>
                                       </tr>
                                       <tr>
                                          <td>Release</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>136ubuntu1</td>
                                       </tr>
                                       <tr>
                                          <td>Version</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>3.0pl1</td>
                                       </tr>
                                       <tr>
                                          <td>Evr</td>
                                          <td>Evr String</td>
                                          <td>Exists</td>
                                          <td>0:3.0pl1-136ubuntu1</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: AC-3, MP-2

            CIS Controls V7.0:

            • Control 14: Controlled Access Based on the Need to Know: -- More
              CIS Control Information
              Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
              Subcontrol: 14.6
              Label: Protect Information through Access Control Lists
              Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
            • >

            CIS Critical Security Controls V8.0:

            • Control 3: Data Protection: -- More
              CIS Control Information
              Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
              Safeguard: 3.3
              Label: Configure Data Access Control Lists
              Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Fail

            4.1.3 Ensure permissions on /etc/cron.hourly are configured

            Description:

            This directory contains system cron jobs that need to run on an hourly basis. The files in this directory cannot be manipulated by the crontab command, but are instead edited by system administrators using a text editor. The commands below restrict read/write and search access to user and group root, preventing regular users from accessing this directory.

            Note: Other methods, such as systemd timers , exist for scheduling jobs. If another method is used, cron should be removed, and the alternate method should be secured in accordance with local site policy

            Granting write access to this directory for non-privileged users could provide them the means for gaining unauthorized elevated privileges. Granting read access to this directory could give an unprivileged user insight in how to gain elevated privileges or circumvent auditing controls.

            Run the following commands to set ownership and permissions on the /etc/cron.hourly directory:

            # chown root:root /etc/cron.hourly/

            # chmod og-rwx /etc/cron.hourly/

            Show Assessment Evidence
            Complex Check
            OR
            Criterion: Ensure at least one file named /etc/cron.hourly/ exists and is owned by 0:0 and does not have permissions ---rwxrwx
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            File Item
            Name Type Status Value
            Path String Exists /etc/cron.hourly
            Filename String Exists No Value
            Type String Exists directory
            Group Id Int Exists 0
            User Id Int Exists 0
            A Time Int Exists 1713148767
            C Time Int Exists 1713148767
            M Time Int Exists 1706723258
            Size Int Exists 4096
            Suid Int Exists false
            Sgid Boolean Exists false
            Sticky Boolean Exists false
            Uread Boolean Exists true
            Uwrite Boolean Exists true
            Uexec Boolean Exists true
            Gread Boolean Exists true
            Gwrite Boolean Exists false
            Gexec Boolean Exists true
            Oread Boolean Exists true
            Owrite Boolean Exists false
            Oexec Boolean Exists true
            Has Extended Acl Boolean Not collected No Value
            Criterion: Ensure package name equals 'cron' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Fail
            Dpkginfo Item
            Name Type Status Value
            Name String Exists cron
            Arch String Exists amd64
            Epoch String Exists (none)
            Release String Exists 136ubuntu1
            Version String Exists 3.0pl1
            Evr Evr String Exists 0:3.0pl1-136ubuntu1


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.1.3_Ensure_permissions_on_etccron.hourly_are_configured"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.890-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3. MP-2</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995008"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995008">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995008"
                                   check="all"
                                   check_existence="at_least_one_exists">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure at least one file named /etc/cron.hourly/ exists and is owned by 0:0 and does not have permissions ---rwxrwx</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>At Least One Exists</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>File Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Path</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>/etc/cron.hourly</td>
                                       </tr>
                                       <tr>
                                          <td>Filename</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>No Value</td>
                                       </tr>
                                       <tr>
                                          <td>Type</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>directory</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Group Id</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>0</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>User Id</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>0</td>
                                       </tr>
                                       <tr>
                                          <td>A Time</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>1713148767</td>
                                       </tr>
                                       <tr>
                                          <td>C Time</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>1713148767</td>
                                       </tr>
                                       <tr>
                                          <td>M Time</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>1706723258</td>
                                       </tr>
                                       <tr>
                                          <td>Size</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>4096</td>
                                       </tr>
                                       <tr>
                                          <td>Suid</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>false</td>
                                       </tr>
                                       <tr>
                                          <td>Sgid</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>false</td>
                                       </tr>
                                       <tr>
                                          <td>Sticky</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>false</td>
                                       </tr>
                                       <tr>
                                          <td>Uread</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr>
                                          <td>Uwrite</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr>
                                          <td>Uexec</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Gread</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Gwrite</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>false</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Gexec</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Oread</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Owrite</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>false</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Oexec</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr>
                                          <td>Has Extended Acl</td>
                                          <td>Boolean</td>
                                          <td>Not collected</td>
                                          <td>No Value</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995014"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995014">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995014"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'cron' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Dpkginfo Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Name</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>cron</td>
                                       </tr>
                                       <tr>
                                          <td>Arch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>amd64</td>
                                       </tr>
                                       <tr>
                                          <td>Epoch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>(none)</td>
                                       </tr>
                                       <tr>
                                          <td>Release</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>136ubuntu1</td>
                                       </tr>
                                       <tr>
                                          <td>Version</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>3.0pl1</td>
                                       </tr>
                                       <tr>
                                          <td>Evr</td>
                                          <td>Evr String</td>
                                          <td>Exists</td>
                                          <td>0:3.0pl1-136ubuntu1</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: AC-3. MP-2

            CIS Controls V7.0:

            • Control 14: Controlled Access Based on the Need to Know: -- More
              CIS Control Information
              Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
              Subcontrol: 14.6
              Label: Protect Information through Access Control Lists
              Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
            • >

            CIS Critical Security Controls V8.0:

            • Control 3: Data Protection: -- More
              CIS Control Information
              Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
              Safeguard: 3.3
              Label: Configure Data Access Control Lists
              Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Fail

            4.1.4 Ensure permissions on /etc/cron.daily are configured

            Description:

            The /etc/cron.daily directory contains system cron jobs that need to run on a daily basis. The files in this directory cannot be manipulated by the crontab command, but are instead edited by system administrators using a text editor. The commands below restrict read/write and search access to user and group root, preventing regular users from accessing this directory.

            Note: Other methods, such as systemd timers , exist for scheduling jobs. If another method is used, cron should be removed, and the alternate method should be secured in accordance with local site policy

            Granting write access to this directory for non-privileged users could provide them the means for gaining unauthorized elevated privileges. Granting read access to this directory could give an unprivileged user insight in how to gain elevated privileges or circumvent auditing controls.

            Run the following commands to set ownership and permissions on the /etc/cron.daily directory:

            # chown root:root /etc/cron.daily/

            # chmod og-rwx /etc/cron.daily/

            Show Assessment Evidence
            Complex Check
            OR
            Criterion: Ensure at least one file named /etc/cron.daily/ exists and is owned by 0:0 and does not have permissions ---rwxrwx
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            File Item
            Name Type Status Value
            Path String Exists /etc/cron.daily
            Filename String Exists No Value
            Type String Exists directory
            Group Id Int Exists 0
            User Id Int Exists 0
            A Time Int Exists 1713148767
            C Time Int Exists 1713148767
            M Time Int Exists 1706723258
            Size Int Exists 4096
            Suid Int Exists false
            Sgid Boolean Exists false
            Sticky Boolean Exists false
            Uread Boolean Exists true
            Uwrite Boolean Exists true
            Uexec Boolean Exists true
            Gread Boolean Exists true
            Gwrite Boolean Exists false
            Gexec Boolean Exists true
            Oread Boolean Exists true
            Owrite Boolean Exists false
            Oexec Boolean Exists true
            Has Extended Acl Boolean Not collected No Value
            Criterion: Ensure package name equals 'cron' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Fail
            Dpkginfo Item
            Name Type Status Value
            Name String Exists cron
            Arch String Exists amd64
            Epoch String Exists (none)
            Release String Exists 136ubuntu1
            Version String Exists 3.0pl1
            Evr Evr String Exists 0:3.0pl1-136ubuntu1


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.1.4_Ensure_permissions_on_etccron.daily_are_configured"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.890-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3. MP-2</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995016"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995016">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995016"
                                   check="all"
                                   check_existence="at_least_one_exists">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure at least one file named /etc/cron.daily/ exists and is owned by 0:0 and does not have permissions ---rwxrwx</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>At Least One Exists</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>File Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Path</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>/etc/cron.daily</td>
                                       </tr>
                                       <tr>
                                          <td>Filename</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>No Value</td>
                                       </tr>
                                       <tr>
                                          <td>Type</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>directory</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Group Id</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>0</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>User Id</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>0</td>
                                       </tr>
                                       <tr>
                                          <td>A Time</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>1713148767</td>
                                       </tr>
                                       <tr>
                                          <td>C Time</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>1713148767</td>
                                       </tr>
                                       <tr>
                                          <td>M Time</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>1706723258</td>
                                       </tr>
                                       <tr>
                                          <td>Size</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>4096</td>
                                       </tr>
                                       <tr>
                                          <td>Suid</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>false</td>
                                       </tr>
                                       <tr>
                                          <td>Sgid</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>false</td>
                                       </tr>
                                       <tr>
                                          <td>Sticky</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>false</td>
                                       </tr>
                                       <tr>
                                          <td>Uread</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr>
                                          <td>Uwrite</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr>
                                          <td>Uexec</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Gread</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Gwrite</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>false</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Gexec</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Oread</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Owrite</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>false</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Oexec</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr>
                                          <td>Has Extended Acl</td>
                                          <td>Boolean</td>
                                          <td>Not collected</td>
                                          <td>No Value</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995021"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995021">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995021"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'cron' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Dpkginfo Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Name</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>cron</td>
                                       </tr>
                                       <tr>
                                          <td>Arch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>amd64</td>
                                       </tr>
                                       <tr>
                                          <td>Epoch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>(none)</td>
                                       </tr>
                                       <tr>
                                          <td>Release</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>136ubuntu1</td>
                                       </tr>
                                       <tr>
                                          <td>Version</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>3.0pl1</td>
                                       </tr>
                                       <tr>
                                          <td>Evr</td>
                                          <td>Evr String</td>
                                          <td>Exists</td>
                                          <td>0:3.0pl1-136ubuntu1</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: AC-3. MP-2

            CIS Controls V7.0:

            • Control 14: Controlled Access Based on the Need to Know: -- More
              CIS Control Information
              Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
              Subcontrol: 14.6
              Label: Protect Information through Access Control Lists
              Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
            • >

            CIS Critical Security Controls V8.0:

            • Control 3: Data Protection: -- More
              CIS Control Information
              Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
              Safeguard: 3.3
              Label: Configure Data Access Control Lists
              Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Fail

            4.1.5 Ensure permissions on /etc/cron.weekly are configured

            Description:

            The /etc/cron.weekly directory contains system cron jobs that need to run on a weekly basis. The files in this directory cannot be manipulated by the crontab command, but are instead edited by system administrators using a text editor. The commands below restrict read/write and search access to user and group root, preventing regular users from accessing this directory.

            Note: Other methods, such as systemd timers , exist for scheduling jobs. If another method is used, cron should be removed, and the alternate method should be secured in accordance with local site policy

            Granting write access to this directory for non-privileged users could provide them the means for gaining unauthorized elevated privileges. Granting read access to this directory could give an unprivileged user insight in how to gain elevated privileges or circumvent auditing controls.

            Run the following commands to set ownership and permissions on the /etc/cron.weekly directory:

            # chown root:root /etc/cron.weekly/

            # chmod og-rwx /etc/cron.weekly/

            Show Assessment Evidence
            Complex Check
            OR
            Criterion: Ensure at least one file named /etc/cron.weekly/ exists and is owned by 0:0 and does not have permissions ---rwxrwx
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            File Item
            Name Type Status Value
            Path String Exists /etc/cron.weekly
            Filename String Exists No Value
            Type String Exists directory
            Group Id Int Exists 0
            User Id Int Exists 0
            A Time Int Exists 1713148767
            C Time Int Exists 1713148767
            M Time Int Exists 1706723258
            Size Int Exists 4096
            Suid Int Exists false
            Sgid Boolean Exists false
            Sticky Boolean Exists false
            Uread Boolean Exists true
            Uwrite Boolean Exists true
            Uexec Boolean Exists true
            Gread Boolean Exists true
            Gwrite Boolean Exists false
            Gexec Boolean Exists true
            Oread Boolean Exists true
            Owrite Boolean Exists false
            Oexec Boolean Exists true
            Has Extended Acl Boolean Not collected No Value
            Criterion: Ensure package name equals 'cron' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Fail
            Dpkginfo Item
            Name Type Status Value
            Name String Exists cron
            Arch String Exists amd64
            Epoch String Exists (none)
            Release String Exists 136ubuntu1
            Version String Exists 3.0pl1
            Evr Evr String Exists 0:3.0pl1-136ubuntu1


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.1.5_Ensure_permissions_on_etccron.weekly_are_configured"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.890-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3. MP-2</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995024"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995024">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995024"
                                   check="all"
                                   check_existence="at_least_one_exists">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure at least one file named /etc/cron.weekly/ exists and is owned by 0:0 and does not have permissions ---rwxrwx</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>At Least One Exists</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>File Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Path</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>/etc/cron.weekly</td>
                                       </tr>
                                       <tr>
                                          <td>Filename</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>No Value</td>
                                       </tr>
                                       <tr>
                                          <td>Type</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>directory</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Group Id</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>0</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>User Id</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>0</td>
                                       </tr>
                                       <tr>
                                          <td>A Time</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>1713148767</td>
                                       </tr>
                                       <tr>
                                          <td>C Time</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>1713148767</td>
                                       </tr>
                                       <tr>
                                          <td>M Time</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>1706723258</td>
                                       </tr>
                                       <tr>
                                          <td>Size</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>4096</td>
                                       </tr>
                                       <tr>
                                          <td>Suid</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>false</td>
                                       </tr>
                                       <tr>
                                          <td>Sgid</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>false</td>
                                       </tr>
                                       <tr>
                                          <td>Sticky</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>false</td>
                                       </tr>
                                       <tr>
                                          <td>Uread</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr>
                                          <td>Uwrite</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr>
                                          <td>Uexec</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Gread</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Gwrite</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>false</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Gexec</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Oread</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Owrite</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>false</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Oexec</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr>
                                          <td>Has Extended Acl</td>
                                          <td>Boolean</td>
                                          <td>Not collected</td>
                                          <td>No Value</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995032"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995032">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995032"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'cron' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Dpkginfo Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Name</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>cron</td>
                                       </tr>
                                       <tr>
                                          <td>Arch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>amd64</td>
                                       </tr>
                                       <tr>
                                          <td>Epoch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>(none)</td>
                                       </tr>
                                       <tr>
                                          <td>Release</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>136ubuntu1</td>
                                       </tr>
                                       <tr>
                                          <td>Version</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>3.0pl1</td>
                                       </tr>
                                       <tr>
                                          <td>Evr</td>
                                          <td>Evr String</td>
                                          <td>Exists</td>
                                          <td>0:3.0pl1-136ubuntu1</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: AC-3. MP-2

            CIS Controls V7.0:

            • Control 14: Controlled Access Based on the Need to Know: -- More
              CIS Control Information
              Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
              Subcontrol: 14.6
              Label: Protect Information through Access Control Lists
              Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
            • >

            CIS Critical Security Controls V8.0:

            • Control 3: Data Protection: -- More
              CIS Control Information
              Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
              Safeguard: 3.3
              Label: Configure Data Access Control Lists
              Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Fail

            4.1.6 Ensure permissions on /etc/cron.monthly are configured

            Description:

            The /etc/cron.monthly directory contains system cron jobs that need to run on a monthly basis. The files in this directory cannot be manipulated by the crontab command, but are instead edited by system administrators using a text editor. The commands below restrict read/write and search access to user and group root, preventing regular users from accessing this directory.

            Note: Other methods, such as systemd timers , exist for scheduling jobs. If another method is used, cron should be removed, and the alternate method should be secured in accordance with local site policy

            Granting write access to this directory for non-privileged users could provide them the means for gaining unauthorized elevated privileges. Granting read access to this directory could give an unprivileged user insight in how to gain elevated privileges or circumvent auditing controls.

            Run the following commands to set ownership and permissions on the /etc/cron.monthly directory:

            # chown root:root /etc/cron.monthly/

            # chmod og-rwx /etc/cron.monthly/

            Show Assessment Evidence
            Complex Check
            OR
            Criterion: Ensure at least one file named /etc/cron.monthly/ exists and is owned by 0:0 and does not have permissions ---rwxrwx
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            File Item
            Name Type Status Value
            Path String Exists /etc/cron.monthly
            Filename String Exists No Value
            Type String Exists directory
            Group Id Int Exists 0
            User Id Int Exists 0
            A Time Int Exists 1713148767
            C Time Int Exists 1713148767
            M Time Int Exists 1706723258
            Size Int Exists 4096
            Suid Int Exists false
            Sgid Boolean Exists false
            Sticky Boolean Exists false
            Uread Boolean Exists true
            Uwrite Boolean Exists true
            Uexec Boolean Exists true
            Gread Boolean Exists true
            Gwrite Boolean Exists false
            Gexec Boolean Exists true
            Oread Boolean Exists true
            Owrite Boolean Exists false
            Oexec Boolean Exists true
            Has Extended Acl Boolean Not collected No Value
            Criterion: Ensure package name equals 'cron' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Fail
            Dpkginfo Item
            Name Type Status Value
            Name String Exists cron
            Arch String Exists amd64
            Epoch String Exists (none)
            Release String Exists 136ubuntu1
            Version String Exists 3.0pl1
            Evr Evr String Exists 0:3.0pl1-136ubuntu1


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.1.6_Ensure_permissions_on_etccron.monthly_are_configured"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.890-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3. MP-2</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995037"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995037">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995037"
                                   check="all"
                                   check_existence="at_least_one_exists">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure at least one file named /etc/cron.monthly/ exists and is owned by 0:0 and does not have permissions ---rwxrwx</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>At Least One Exists</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>File Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Path</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>/etc/cron.monthly</td>
                                       </tr>
                                       <tr>
                                          <td>Filename</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>No Value</td>
                                       </tr>
                                       <tr>
                                          <td>Type</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>directory</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Group Id</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>0</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>User Id</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>0</td>
                                       </tr>
                                       <tr>
                                          <td>A Time</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>1713148767</td>
                                       </tr>
                                       <tr>
                                          <td>C Time</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>1713148767</td>
                                       </tr>
                                       <tr>
                                          <td>M Time</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>1706723258</td>
                                       </tr>
                                       <tr>
                                          <td>Size</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>4096</td>
                                       </tr>
                                       <tr>
                                          <td>Suid</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>false</td>
                                       </tr>
                                       <tr>
                                          <td>Sgid</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>false</td>
                                       </tr>
                                       <tr>
                                          <td>Sticky</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>false</td>
                                       </tr>
                                       <tr>
                                          <td>Uread</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr>
                                          <td>Uwrite</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr>
                                          <td>Uexec</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Gread</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Gwrite</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>false</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Gexec</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Oread</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Owrite</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>false</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Oexec</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr>
                                          <td>Has Extended Acl</td>
                                          <td>Boolean</td>
                                          <td>Not collected</td>
                                          <td>No Value</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995045"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995045">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995045"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'cron' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Dpkginfo Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Name</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>cron</td>
                                       </tr>
                                       <tr>
                                          <td>Arch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>amd64</td>
                                       </tr>
                                       <tr>
                                          <td>Epoch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>(none)</td>
                                       </tr>
                                       <tr>
                                          <td>Release</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>136ubuntu1</td>
                                       </tr>
                                       <tr>
                                          <td>Version</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>3.0pl1</td>
                                       </tr>
                                       <tr>
                                          <td>Evr</td>
                                          <td>Evr String</td>
                                          <td>Exists</td>
                                          <td>0:3.0pl1-136ubuntu1</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: AC-3. MP-2

            CIS Controls V7.0:

            • Control 14: Controlled Access Based on the Need to Know: -- More
              CIS Control Information
              Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
              Subcontrol: 14.6
              Label: Protect Information through Access Control Lists
              Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
            • >

            CIS Critical Security Controls V8.0:

            • Control 3: Data Protection: -- More
              CIS Control Information
              Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
              Safeguard: 3.3
              Label: Configure Data Access Control Lists
              Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Fail

            4.1.7 Ensure permissions on /etc/cron.d are configured

            Description:

            The /etc/cron.d directory contains system cron jobs that need to run in a similar manner to the hourly, daily weekly and monthly jobs from /etc/crontab , but require more granular control as to when they run. The files in this directory cannot be manipulated by the crontab command, but are instead edited by system administrators using a text editor. The commands below restrict read/write and search access to user and group root, preventing regular users from accessing this directory.

            Note: Other methods, such as systemd timers , exist for scheduling jobs. If another method is used, cron should be removed, and the alternate method should be secured in accordance with local site policy

            Granting write access to this directory for non-privileged users could provide them the means for gaining unauthorized elevated privileges. Granting read access to this directory could give an unprivileged user insight in how to gain elevated privileges or circumvent auditing controls.

            Run the following commands to set ownership and permissions on the /etc/cron.d directory:

            # chown root:root /etc/cron.d/

            # chmod og-rwx /etc/cron.d/

            Show Assessment Evidence
            Complex Check
            OR
            Criterion: Ensure at least one file named /etc/cron.d/ exists and is owned by 0:0 and does not have permissions ---rwxrwx
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            File Item
            Name Type Status Value
            Path String Exists /etc/cron.d
            Filename String Exists No Value
            Type String Exists directory
            Group Id Int Exists 0
            User Id Int Exists 0
            A Time Int Exists 1713148767
            C Time Int Exists 1713148767
            M Time Int Exists 1706723258
            Size Int Exists 4096
            Suid Int Exists false
            Sgid Boolean Exists false
            Sticky Boolean Exists false
            Uread Boolean Exists true
            Uwrite Boolean Exists true
            Uexec Boolean Exists true
            Gread Boolean Exists true
            Gwrite Boolean Exists false
            Gexec Boolean Exists true
            Oread Boolean Exists true
            Owrite Boolean Exists false
            Oexec Boolean Exists true
            Has Extended Acl Boolean Not collected No Value
            Criterion: Ensure package name equals 'cron' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Fail
            Dpkginfo Item
            Name Type Status Value
            Name String Exists cron
            Arch String Exists amd64
            Epoch String Exists (none)
            Release String Exists 136ubuntu1
            Version String Exists 3.0pl1
            Evr Evr String Exists 0:3.0pl1-136ubuntu1


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.1.7_Ensure_permissions_on_etccron.d_are_configured"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.891-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3. MP-2</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995050"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995050">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995050"
                                   check="all"
                                   check_existence="at_least_one_exists">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure at least one file named /etc/cron.d/ exists and is owned by 0:0 and does not have permissions ---rwxrwx</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>At Least One Exists</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>File Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Path</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>/etc/cron.d</td>
                                       </tr>
                                       <tr>
                                          <td>Filename</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>No Value</td>
                                       </tr>
                                       <tr>
                                          <td>Type</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>directory</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Group Id</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>0</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>User Id</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>0</td>
                                       </tr>
                                       <tr>
                                          <td>A Time</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>1713148767</td>
                                       </tr>
                                       <tr>
                                          <td>C Time</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>1713148767</td>
                                       </tr>
                                       <tr>
                                          <td>M Time</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>1706723258</td>
                                       </tr>
                                       <tr>
                                          <td>Size</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>4096</td>
                                       </tr>
                                       <tr>
                                          <td>Suid</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>false</td>
                                       </tr>
                                       <tr>
                                          <td>Sgid</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>false</td>
                                       </tr>
                                       <tr>
                                          <td>Sticky</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>false</td>
                                       </tr>
                                       <tr>
                                          <td>Uread</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr>
                                          <td>Uwrite</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr>
                                          <td>Uexec</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Gread</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Gwrite</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>false</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Gexec</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Oread</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Owrite</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>false</td>
                                       </tr>
                                       <tr class="evaluated">
                                          <td>Oexec</td>
                                          <td>Boolean</td>
                                          <td>Exists</td>
                                          <td>true</td>
                                       </tr>
                                       <tr>
                                          <td>Has Extended Acl</td>
                                          <td>Boolean</td>
                                          <td>Not collected</td>
                                          <td>No Value</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995056"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995056">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995056"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'cron' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Dpkginfo Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Name</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>cron</td>
                                       </tr>
                                       <tr>
                                          <td>Arch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>amd64</td>
                                       </tr>
                                       <tr>
                                          <td>Epoch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>(none)</td>
                                       </tr>
                                       <tr>
                                          <td>Release</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>136ubuntu1</td>
                                       </tr>
                                       <tr>
                                          <td>Version</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>3.0pl1</td>
                                       </tr>
                                       <tr>
                                          <td>Evr</td>
                                          <td>Evr String</td>
                                          <td>Exists</td>
                                          <td>0:3.0pl1-136ubuntu1</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: AC-3. MP-2

            CIS Controls V7.0:

            • Control 14: Controlled Access Based on the Need to Know: -- More
              CIS Control Information
              Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
              Subcontrol: 14.6
              Label: Protect Information through Access Control Lists
              Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
            • >

            CIS Critical Security Controls V8.0:

            • Control 3: Data Protection: -- More
              CIS Control Information
              Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
              Safeguard: 3.3
              Label: Configure Data Access Control Lists
              Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Fail

            4.1.8 Ensure cron is restricted to authorized users

            Description:

            Configure /etc/cron.allow to allow specific users to use this service. If /etc/cron.allow does not exist, then /etc/cron.deny is checked. Any user not specifically defined in this file is allowed to use cron. By removing the file, only users in /etc/cron.allow are allowed to use cron.

            Note:

            • Other methods, such as systemd timers , exist for scheduling jobs. If another method is used, cron should be removed, and the alternate method should be secured in accordance with local site policy
            • Even though a given user is not listed in cron.allow , cron jobs can still be run as that user
            • The cron.allow file only controls administrative access to the crontab command for scheduling and modifying cron jobs

            On many systems, only the system administrator is authorized to schedule cron jobs. Using the cron.allow file to control who can run cron jobs enforces this policy. It is easier to manage an allow list than a deny list. In a deny list, you could potentially add a user ID to the system and forget to add it to the deny files.

            Run the following script to:

            • Remove /etc/cron.deny if it exists
            • Create /etc/cron.allow if it doesn't exist
            • Change ownership of /etc/cron.allow to the root user
            • Change group ownership of /etc/cron.allow to the group crontab
            #!/usr/bin/env bash



            {

            if dpkg-query -W cron > /dev/null 2>&1; then

            l_file="/etc/cron.allow"

            l_mask='0137'

            l_maxperm="$( printf '%o' $(( 0777 & ~$l_mask)) )"

            if [ -e /etc/cron.deny ]; then

            echo -e " - Removing \"/etc/cron.deny\""

            rm -f /etc/cron.deny

            fi

            if [ ! -e /etc/cron.allow ]; then

            echo -e " - creating \"$l_file\""

            touch "$l_file"

            fi

            while read l_mode l_fown l_fgroup; do

            if [ $(( $l_mode & $l_mask )) -gt 0 ]; then

            echo -e " - Removing excessive permissions from \"$l_file\""

            chmod u-x,g-wx,o-rwx "$l_file"

            fi

            if [ "$l_fown" != "root" ]; then

            echo -e " - Changing owner on \"$l_file\" from: \"$l_fown\" to: \"root\""

            chown root "$l_file"

            fi

            if [ "$l_fgroup" != "crontab" ]; then

            echo -e " - Changing group owner on \"$l_file\" from: \"$l_fgroup\" to: \"crontab\""

            chgrp crontab "$l_file"

            fi

            done < <(stat -Lc '%#a %U %G' "$l_file")

            else

            echo -e "- cron is not installed on the system, no remediation required\n"

            fi

            }

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Criterion: Ensure at least one file named /etc/cron.allow exists and is owned by user 0 and does not have permissions --x-wxrwx
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            No matching system items were found.
            Criterion: Ensure no file named /etc/cron.deny exists and unknown test
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensure package name equals 'cron' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Fail
            Dpkginfo Item
            Name Type Status Value
            Name String Exists cron
            Arch String Exists amd64
            Epoch String Exists (none)
            Release String Exists 136ubuntu1
            Version String Exists 3.0pl1
            Evr Evr String Exists 0:3.0pl1-136ubuntu1


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.1.8_Ensure_cron_is_restricted_to_authorized_users"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.891-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3. MP-2</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995060"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995060">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995060"
                                      check="all"
                                      check_existence="at_least_one_exists">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure at least one file named /etc/cron.allow exists and is owned by user 0 and does not have permissions --x-wxrwx</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>At Least One Exists</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="fail">Fail</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995066"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995066">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995066"
                                      check="all"
                                      check_existence="none_exist">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure no file named /etc/cron.deny exists and unknown test</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>None Exist</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995070"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995070">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995070"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'cron' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Dpkginfo Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Name</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>cron</td>
                                       </tr>
                                       <tr>
                                          <td>Arch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>amd64</td>
                                       </tr>
                                       <tr>
                                          <td>Epoch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>(none)</td>
                                       </tr>
                                       <tr>
                                          <td>Release</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>136ubuntu1</td>
                                       </tr>
                                       <tr>
                                          <td>Version</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>3.0pl1</td>
                                       </tr>
                                       <tr>
                                          <td>Evr</td>
                                          <td>Evr String</td>
                                          <td>Exists</td>
                                          <td>0:3.0pl1-136ubuntu1</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: AC-3. MP-2

            CIS Controls V7.0:

            • Control 14: Controlled Access Based on the Need to Know: -- More
              CIS Control Information
              Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
              Subcontrol: 14.6
              Label: Protect Information through Access Control Lists
              Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
            • >

            CIS Critical Security Controls V8.0:

            • Control 3: Data Protection: -- More
              CIS Control Information
              Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
              Safeguard: 3.3
              Label: Configure Data Access Control Lists
              Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Pass

            4.1.9 Ensure at is restricted to authorized users

            Description:

            Configure /etc/at.allow to allow specific users to use this service. If /etc/at.allow does not exist, then /etc/at.deny is checked. Any user not specifically defined in this file is allowed to use at . By removing the file, only users in /etc/at.allow are allowed to use at .

            Note: Other methods, such as systemd timers , exist for scheduling jobs. If another method is used, at should be removed, and the alternate method should be secured in accordance with local site policy

            On many systems, only the system administrator is authorized to schedule at jobs. Using the at.allow file to control who can run at jobs enforces this policy. It is easier to manage an allow list than a deny list. In a deny list, you could potentially add a user ID to the system and forget to add it to the deny files.

            Run the following script to:

            • Remove /etc/at.deny if it exists
            • Create /etc/at.allow if it doesn't exist
            • Change ownership of /etc/at.allow to the root user
            • Change group ownership of /etc/at.allow to the group root
            #!/usr/bin/env bash



            {

            if dpkg-query -W at > /dev/null 2>&1; then

            l_file="/etc/at.allow"

            l_mask='0137'

            l_maxperm="$( printf '%o' $(( 0777 & ~$l_mask)) )"

            if [ -e /etc/at.deny ]; then

            echo -e " - Removing \"/etc/at.deny\""

            rm -f /etc/at.deny

            fi

            if [ ! -e /etc/at.allow ]; then

            echo -e " - creating \"$l_file\""

            touch "$l_file"

            fi

            while read l_mode l_fown l_fgroup; do

            if [ $(( $l_mode & $l_mask )) -gt 0 ]; then

            echo -e " - Removing excessive permissions from \"$l_file\""

            chmod u-x,g-wx,o-rwx "$l_file"

            fi

            if [ "$l_fown" != "root" ]; then

            echo -e " - Changing owner on \"$l_file\" from: \"$l_fown\" to: \"root\""

            chown root "$l_file"

            fi

            if [ "$l_fgroup" != "root" ]; then

            echo -e " - Changing group owner on \"$l_file\" from: \"$l_fgroup\" to: \"root\""

            chgrp root "$l_file"

            fi

            done < <(stat -Lc '%#a %U %G' "$l_file")

            else

            echo -e "- cron is not installed on the system, no remediation required\n"

            fi

            }

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Criterion: Ensure at least one file named /etc/at.allow exists and is owned by 0:0 and does not have permissions ----wxrwx
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            No matching system items were found.
            Criterion: Ensure no file named /etc/at.deny exists and unknown test
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensure package name equals 'at' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.1.9_Ensure_at_is_restricted_to_authorized_users"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.891-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3. MP-2</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995073"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995073">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995073"
                                      check="all"
                                      check_existence="at_least_one_exists">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure at least one file named /etc/at.allow exists and is owned by 0:0 and does not have permissions ----wxrwx</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>At Least One Exists</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="fail">Fail</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995080"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995080">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995080"
                                      check="all"
                                      check_existence="none_exist">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure no file named /etc/at.deny exists and unknown test</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>None Exist</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995084"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995084">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995084"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'at' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: AC-3. MP-2

            CIS Controls V7.0:

            • Control 14: Controlled Access Based on the Need to Know: -- More
              CIS Control Information
              Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
              Subcontrol: 14.6
              Label: Protect Information through Access Control Lists
              Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
            • >

            CIS Critical Security Controls V8.0:

            • Control 3: Data Protection: -- More
              CIS Control Information
              Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
              Safeguard: 3.3
              Label: Configure Data Access Control Lists
              Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            4.2 Configure SSH Server

            SSH is a secure, encrypted replacement for common login services such as telnet , ftp , rlogin , rsh , and rcp . It is strongly recommended that sites abandon older clear-text login protocols and use SSH to prevent session hijacking and sniffing of sensitive data off the network.

            Note:

            • The recommendations in this section only apply if the SSH daemon is installed on the system, if remote access is not required the SSH daemon can be removed and this section skipped.
            • The following openSSH daemon configuration options, Include and Match , may cause the audits in this section's recommendations to report incorrectly. It is recommended that these options only be used if they're needed and fully understood. If these options are configured in accordance with local site policy, they should be accounted for when following the recommendations in this section.
            • The default Include location is the /etc/ssh/sshd_config.d directory. This default has been accounted for in this section. If a file has an additional Include that isn't this default location, the files should be reviewed to verify that the recommended setting is not being over-ridden.
            • The audits of the running configuration in this section are run in the context of the root user, the local host name, and the local host's IP address. If a Match block exists that matches one of these criteria, the output of the audit will be from the match block. The respective matched criteria should be replaced with a non-matching substitution.
            • Once all configuration changes have been made to /etc/ssh/sshd_config or any included configuration files, the sshd configuration must be reloaded
            • Include :
              • Include the specified configuration file(s).
              • Multiple pathnames may be specified and each pathname may contain glob(7) wildcards.
              • Files without absolute paths are assumed to be in /etc/ssh.
              • An Include directive may appear inside a Match block to perform conditional inclusion.
            • Match :
              • Introduces a conditional block.
              • If all of the criteria on the Match line are satisfied, the keywords on the following lines override those set in the global section of the config file, until either another Match line or the end of the file.
              • If a keyword appears in multiple Match blocks that are satisfied, only the first instance of the keyword is applied.
              • The arguments to Match are one or more criteria-pattern pairs or the single token All which matches all criteria. The available criteria are User, Group, Host, LocalAddress, LocalPort, RDomain, and Address (with RDomain representing the rdomain(4) on which the connection was received).
              • The match patterns may consist of single entries or comma-separated lists and may use the wildcard and negation operators described in the PATTERNS section of ssh_config(5).
              • The patterns in an Address criteria may additionally contain addresses to match in CIDR address/masklen format, such as 192.0.2.0/24 or 2001:db8::/32. Note that the mask length provided must be consistent with the address - it is an error to specify a mask length that is too long for the address or one with bits set in this host portion of the address. For example, 192.0.2.0/33 and 192.0.2.0/8, respectively.
              • Only a subset of keywords may be used on the lines following a Match keyword.
              • Available keywords are: AcceptEnv , AllowAgentForwarding , AllowGroups , AllowStreamLocalForwarding , AllowTcpForwarding , AllowUsers , AuthenticationMethods , AuthorizedKeysCommand , AuthorizedKeysCommandUser , AuthorizedKeysFile , AuthorizedPrincipalsCommand , AuthorizedPrincipalsCommandUser , AuthorizedPrincipalsFile , Banner , ChrootDirectory , ClientAliveCountMax , ClientAliveInterval , DenyGroups , DenyUsers , ForceCommand , GatewayPorts , GSSAPIAuthentication , HostbasedAcceptedKeyTypes , HostbasedAuthentication , HostbasedUsesNameFromPacketOnly , Include , IPQoS , KbdInteractiveAuthentication , KerberosAuthentication , LogLevel , MaxAuthTries , MaxSessions , PasswordAuthentication , PermitEmptyPasswords , PermitListen , PermitOpen , PermitRootLogin , PermitTTY , PermitTunnel , PermitUserRC , PubkeyAcceptedKeyTypes , PubkeyAuthentication , RekeyLimit , RevokedKeys , RDomain , SetEnv , StreamLocalBindMask , StreamLocalBindUnlink , TrustedUserCAKeys , X11DisplayOffset , X11Forwarding and X11UseLocalhost .

            Command to re-load the SSH daemon configuration:

            # systemctl reload sshd

            Command to remove the SSH daemon:

            # apt purge openssh-server
            Fail

            4.2.1 Ensure permissions on /etc/ssh/sshd_config are configured

            Description:

            The file /etc/ssh/sshd_config , and files ending in .conf in the /etc/ssh/sshd_config.d directory, contain configuration specifications for sshd .

            configuration specifications for sshd need to be protected from unauthorized changes by non-privileged users.

            Run the following script to set ownership and permissions on /etc/ssh/sshd_config and files ending in .conf in the /etc/ssh/sshd_config.d directory:

            #!/usr/bin/env bash



            {

            chmod u-x,og-rwx /etc/ssh/sshd_config

            chown root:root /etc/ssh/sshd_config

            while IFS= read -r -d $'\0' l_file; do

            if [ -e "$l_file" ]; then

            chmod u-x,og-rwx "$l_file"

            chown root:root "$l_file"

            fi

            done < <(find /etc/ssh/sshd_config.d -type f -print0)

            }

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Criterion: Ensure at least one file named /etc/ssh/sshd_config exists and is owned by 0:0 and does not have permissions ---rwxrwx
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            File Item
            Name Type Status Value
            Filepath String Exists /etc/ssh/sshd_config
            Path String Exists /etc/ssh
            Filename String Exists sshd_config
            Type String Exists regular
            Group Id Int Exists 0
            User Id Int Exists 0
            A Time Int Exists 1706723112
            C Time Int Exists 1713148752
            M Time Int Exists 1706723112
            Size Int Exists 3309
            Suid Int Exists false
            Sgid Boolean Exists false
            Sticky Boolean Exists false
            Uread Boolean Exists true
            Uwrite Boolean Exists true
            Uexec Boolean Exists false
            Gread Boolean Exists true
            Gwrite Boolean Exists false
            Gexec Boolean Exists false
            Oread Boolean Exists true
            Owrite Boolean Exists false
            Oexec Boolean Exists false
            Has Extended Acl Boolean Not collected No Value
            Criterion: Ensure any file(s) named ^.+\.conf$ in /etc/ssh/sshd_config.d/ exists and is owned by 0:0 and does not have permissions --xrwxrwx
            Existence Check: Any Exist
            Item Check: All
            Result: Pass
            File Item
            Name Type Status Value
            Path String Exists /etc/ssh/sshd_config.d/
            Filename String Exists ^.+\.conf$
            Type String Not collected No Value
            Group Id Int Does not exist No Value
            User Id Int Does not exist No Value
            A Time Int Exists null
            C Time Int Exists null
            M Time Int Exists null
            Size Int Does not exist No Value
            Suid Int Exists false
            Sgid Boolean Exists false
            Sticky Boolean Exists false
            Uread Boolean Exists false
            Uwrite Boolean Exists false
            Uexec Boolean Exists false
            Gread Boolean Exists false
            Gwrite Boolean Exists false
            Gexec Boolean Exists false
            Oread Boolean Exists false
            Owrite Boolean Exists false
            Oexec Boolean Exists false
            Has Extended Acl Boolean Not collected No Value
            Criterion: Ensure package name equals 'openssh-server' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Fail
            Dpkginfo Item
            Name Type Status Value
            Name String Exists openssh-server
            Arch String Exists amd64
            Epoch String Exists 1
            Release String Exists 4ubuntu0.11
            Version String Exists 8.2p1
            Evr Evr String Exists 1:8.2p1-4ubuntu0.11


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.2.1_Ensure_permissions_on_etcsshsshd_config_are_configured"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.891-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3. MP-2</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995089"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995089">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995089"
                                      check="all"
                                      check_existence="at_least_one_exists">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure at least one file named /etc/ssh/sshd_config exists and is owned by 0:0 and does not have permissions ---rwxrwx</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>At Least One Exists</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="fail">Fail</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <caption>File Item</caption>
                                       <thead>
                                          <tr>
                                             <th scope="col">Name</th>
                                             <th scope="col">Type</th>
                                             <th scope="col">Status</th>
                                             <th scope="col">Value</th>
                                          </tr>
                                       </thead>
                                       <tbody class="tbe">
                                          <tr>
                                             <td>Filepath</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>/etc/ssh/sshd_config</td>
                                          </tr>
                                          <tr>
                                             <td>Path</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>/etc/ssh</td>
                                          </tr>
                                          <tr>
                                             <td>Filename</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>sshd_config</td>
                                          </tr>
                                          <tr>
                                             <td>Type</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>regular</td>
                                          </tr>
                                          <tr class="evaluated">
                                             <td>Group Id</td>
                                             <td>Int</td>
                                             <td>Exists</td>
                                             <td>0</td>
                                          </tr>
                                          <tr class="evaluated">
                                             <td>User Id</td>
                                             <td>Int</td>
                                             <td>Exists</td>
                                             <td>0</td>
                                          </tr>
                                          <tr>
                                             <td>A Time</td>
                                             <td>Int</td>
                                             <td>Exists</td>
                                             <td>1706723112</td>
                                          </tr>
                                          <tr>
                                             <td>C Time</td>
                                             <td>Int</td>
                                             <td>Exists</td>
                                             <td>1713148752</td>
                                          </tr>
                                          <tr>
                                             <td>M Time</td>
                                             <td>Int</td>
                                             <td>Exists</td>
                                             <td>1706723112</td>
                                          </tr>
                                          <tr>
                                             <td>Size</td>
                                             <td>Int</td>
                                             <td>Exists</td>
                                             <td>3309</td>
                                          </tr>
                                          <tr>
                                             <td>Suid</td>
                                             <td>Int</td>
                                             <td>Exists</td>
                                             <td>false</td>
                                          </tr>
                                          <tr>
                                             <td>Sgid</td>
                                             <td>Boolean</td>
                                             <td>Exists</td>
                                             <td>false</td>
                                          </tr>
                                          <tr>
                                             <td>Sticky</td>
                                             <td>Boolean</td>
                                             <td>Exists</td>
                                             <td>false</td>
                                          </tr>
                                          <tr>
                                             <td>Uread</td>
                                             <td>Boolean</td>
                                             <td>Exists</td>
                                             <td>true</td>
                                          </tr>
                                          <tr>
                                             <td>Uwrite</td>
                                             <td>Boolean</td>
                                             <td>Exists</td>
                                             <td>true</td>
                                          </tr>
                                          <tr>
                                             <td>Uexec</td>
                                             <td>Boolean</td>
                                             <td>Exists</td>
                                             <td>false</td>
                                          </tr>
                                          <tr class="evaluated">
                                             <td>Gread</td>
                                             <td>Boolean</td>
                                             <td>Exists</td>
                                             <td>true</td>
                                          </tr>
                                          <tr class="evaluated">
                                             <td>Gwrite</td>
                                             <td>Boolean</td>
                                             <td>Exists</td>
                                             <td>false</td>
                                          </tr>
                                          <tr class="evaluated">
                                             <td>Gexec</td>
                                             <td>Boolean</td>
                                             <td>Exists</td>
                                             <td>false</td>
                                          </tr>
                                          <tr class="evaluated">
                                             <td>Oread</td>
                                             <td>Boolean</td>
                                             <td>Exists</td>
                                             <td>true</td>
                                          </tr>
                                          <tr class="evaluated">
                                             <td>Owrite</td>
                                             <td>Boolean</td>
                                             <td>Exists</td>
                                             <td>false</td>
                                          </tr>
                                          <tr class="evaluated">
                                             <td>Oexec</td>
                                             <td>Boolean</td>
                                             <td>Exists</td>
                                             <td>false</td>
                                          </tr>
                                          <tr>
                                             <td>Has Extended Acl</td>
                                             <td>Boolean</td>
                                             <td>Not collected</td>
                                             <td>No Value</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995103"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995103">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995103"
                                      check="all"
                                      check_existence="any_exist">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure any file(s) named ^.+\.conf$ in /etc/ssh/sshd_config.d/ exists and is owned by 0:0 and does not have permissions --xrwxrwx</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>Any Exist</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <caption>File Item</caption>
                                       <thead>
                                          <tr>
                                             <th scope="col">Name</th>
                                             <th scope="col">Type</th>
                                             <th scope="col">Status</th>
                                             <th scope="col">Value</th>
                                          </tr>
                                       </thead>
                                       <tbody class="tbe">
                                          <tr>
                                             <td>Path</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>/etc/ssh/sshd_config.d/</td>
                                          </tr>
                                          <tr>
                                             <td>Filename</td>
                                             <td>String</td>
                                             <td>Exists</td>
                                             <td>^.+\.conf$</td>
                                          </tr>
                                          <tr>
                                             <td>Type</td>
                                             <td>String</td>
                                             <td>Not collected</td>
                                             <td>No Value</td>
                                          </tr>
                                          <tr class="evaluated">
                                             <td>Group Id</td>
                                             <td>Int</td>
                                             <td>Does not exist</td>
                                             <td>No Value</td>
                                          </tr>
                                          <tr>
                                             <td>User Id</td>
                                             <td>Int</td>
                                             <td>Does not exist</td>
                                             <td>No Value</td>
                                          </tr>
                                          <tr>
                                             <td>A Time</td>
                                             <td>Int</td>
                                             <td>Exists</td>
                                             <td>null</td>
                                          </tr>
                                          <tr>
                                             <td>C Time</td>
                                             <td>Int</td>
                                             <td>Exists</td>
                                             <td>null</td>
                                          </tr>
                                          <tr>
                                             <td>M Time</td>
                                             <td>Int</td>
                                             <td>Exists</td>
                                             <td>null</td>
                                          </tr>
                                          <tr>
                                             <td>Size</td>
                                             <td>Int</td>
                                             <td>Does not exist</td>
                                             <td>No Value</td>
                                          </tr>
                                          <tr>
                                             <td>Suid</td>
                                             <td>Int</td>
                                             <td>Exists</td>
                                             <td>false</td>
                                          </tr>
                                          <tr>
                                             <td>Sgid</td>
                                             <td>Boolean</td>
                                             <td>Exists</td>
                                             <td>false</td>
                                          </tr>
                                          <tr>
                                             <td>Sticky</td>
                                             <td>Boolean</td>
                                             <td>Exists</td>
                                             <td>false</td>
                                          </tr>
                                          <tr>
                                             <td>Uread</td>
                                             <td>Boolean</td>
                                             <td>Exists</td>
                                             <td>false</td>
                                          </tr>
                                          <tr>
                                             <td>Uwrite</td>
                                             <td>Boolean</td>
                                             <td>Exists</td>
                                             <td>false</td>
                                          </tr>
                                          <tr class="evaluated">
                                             <td>Uexec</td>
                                             <td>Boolean</td>
                                             <td>Exists</td>
                                             <td>false</td>
                                          </tr>
                                          <tr class="evaluated">
                                             <td>Gread</td>
                                             <td>Boolean</td>
                                             <td>Exists</td>
                                             <td>false</td>
                                          </tr>
                                          <tr class="evaluated">
                                             <td>Gwrite</td>
                                             <td>Boolean</td>
                                             <td>Exists</td>
                                             <td>false</td>
                                          </tr>
                                          <tr class="evaluated">
                                             <td>Gexec</td>
                                             <td>Boolean</td>
                                             <td>Exists</td>
                                             <td>false</td>
                                          </tr>
                                          <tr class="evaluated">
                                             <td>Oread</td>
                                             <td>Boolean</td>
                                             <td>Exists</td>
                                             <td>false</td>
                                          </tr>
                                          <tr class="evaluated">
                                             <td>Owrite</td>
                                             <td>Boolean</td>
                                             <td>Exists</td>
                                             <td>false</td>
                                          </tr>
                                          <tr class="evaluated">
                                             <td>Oexec</td>
                                             <td>Boolean</td>
                                             <td>Exists</td>
                                             <td>false</td>
                                          </tr>
                                          <tr>
                                             <td>Has Extended Acl</td>
                                             <td>Boolean</td>
                                             <td>Not collected</td>
                                             <td>No Value</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995098"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995098">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995098"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'openssh-server' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Dpkginfo Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Name</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>openssh-server</td>
                                       </tr>
                                       <tr>
                                          <td>Arch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>amd64</td>
                                       </tr>
                                       <tr>
                                          <td>Epoch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>1</td>
                                       </tr>
                                       <tr>
                                          <td>Release</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>4ubuntu0.11</td>
                                       </tr>
                                       <tr>
                                          <td>Version</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>8.2p1</td>
                                       </tr>
                                       <tr>
                                          <td>Evr</td>
                                          <td>Evr String</td>
                                          <td>Exists</td>
                                          <td>1:8.2p1-4ubuntu0.11</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: AC-3. MP-2

            CIS Controls V7.0:

            • Control 14: Controlled Access Based on the Need to Know: -- More
              CIS Control Information
              Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
              Subcontrol: 14.6
              Label: Protect Information through Access Control Lists
              Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
            • >

            CIS Critical Security Controls V8.0:

            • Control 3: Data Protection: -- More
              CIS Control Information
              Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
              Safeguard: 3.3
              Label: Configure Data Access Control Lists
              Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Pass

            4.2.2 Ensure permissions on SSH private host key files are configured

            Description:

            An SSH private key is one of two files used in SSH public key authentication. In this authentication method, the possession of the private key is proof of identity. Only a private key that corresponds to a public key will be able to authenticate successfully. The private keys need to be stored and handled carefully, and no copies of the private key should be distributed.

            If an unauthorized user obtains the private SSH host key file, the host could be impersonated

            Run the following script to set mode, ownership, and group on the private SSH host key files:

            #!/usr/bin/env bash



            {

            l_output="" l_output2=""

            l_skgn="ssh_keys" # Group designated to own openSSH keys

            l_skgid="$(awk -F: '($1 == "'"$l_skgn"'"){print $3}' /etc/group)" # Get gid of group

            if [ -n "$l_skgid" ]; then

            l_agroup="(root|$l_skgn)" && l_sgroup="$l_skgn" && l_mfix="u-x,g-wx,o-rwx"

            else

            l_agroup="root" && l_sgroup="root" && l_mfix="u-x,go-rwx"

            fi

            unset a_skarr && a_skarr=() # Clear and initialize array

            while IFS= read -r -d $'\0' l_file; do # Loop to populate array

            if grep -Pq ':\h+OpenSSH\h+private\h+key\b' <<< "$(file "$l_file")"; then

            a_skarr+=("$(stat -Lc '%n^%#a^%U^%G^%g' "$l_file")")

            fi

            done < <(find -L /etc/ssh -xdev -type f -print0)

            while IFS="^" read -r l_file l_mode l_owner l_group l_gid; do

            l_out2=""

            [ "$l_gid" = "$l_skgid" ] && l_pmask="0137" || l_pmask="0177"

            l_maxperm="$( printf '%o' $(( 0777 & ~$l_pmask )) )"

            if [ $(( $l_mode & $l_pmask )) -gt 0 ]; then

            l_out2="$l_out2\n - Mode: \"$l_mode\" should be mode: \"$l_maxperm\" or more restrictive\n - Revoking excess permissions"

            chmod "$l_mfix" "$l_file"

            fi

            if [ "$l_owner" != "root" ]; then

            l_out2="$l_out2\n - Owned by: \"$l_owner\" should be owned by \"root\"\n - Changing ownership to \"root\""

            chown root "$l_file"

            fi

            if [[ ! "$l_group" =~ $l_agroup ]]; then

            l_out2="$l_out2\n - Owned by group \"$l_group\" should be group owned by: \"${l_agroup//|/ or }\"\n - Changing group ownership to \"$l_sgroup\""

            chgrp "$l_sgroup" "$l_file"

            fi

            [ -n "$l_out2" ] && l_output2="$l_output2\n - File: \"$l_file\"$l_out2"

            done <<< "$(printf '%s\n' "${a_skarr[@]}")"

            unset a_skarr

            if [ -z "$l_output2" ]; then

            echo -e "\n- No access changes required\n"

            else

            echo -e "\n- Remediation results:\n$l_output2\n"

            fi

            }

            Show Assessment Evidence
            Complex Check
            OR
            Script: sce/nix_ssh_private_key_perm_chk.sh
            Result: Pass
            Exit Value: 101
            Output:
            • - Audit Result:
            • *** PASS ***
            • - * Correctly set * :
            Errors:
            • /root/Assessor/sce/nix_ssh_private_key_perm_chk.sh: line 20: file: command not found
            • /root/Assessor/sce/nix_ssh_private_key_perm_chk.sh: line 20: file: command not found
            • /root/Assessor/sce/nix_ssh_private_key_perm_chk.sh: line 20: file: command not found
            • /root/Assessor/sce/nix_ssh_private_key_perm_chk.sh: line 20: file: command not found
            • /root/Assessor/sce/nix_ssh_private_key_perm_chk.sh: line 20: file: command not found
            • /root/Assessor/sce/nix_ssh_private_key_perm_chk.sh: line 20: file: command not found
            • /root/Assessor/sce/nix_ssh_private_key_perm_chk.sh: line 20: file: command not found
            • /root/Assessor/sce/nix_ssh_private_key_perm_chk.sh: line 20: file: command not found
            • /root/Assessor/sce/nix_ssh_private_key_perm_chk.sh: line 20: file: command not found
            • /root/Assessor/sce/nix_ssh_private_key_perm_chk.sh: line 28: & 0177 : syntax error: operand expected (error token is "& 0177 ")
            Criterion: Ensure package name equals 'openssh-server' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Fail
            Dpkginfo Item
            Name Type Status Value
            Name String Exists openssh-server
            Arch String Exists amd64
            Epoch String Exists 1
            Release String Exists 4ubuntu0.11
            Version String Exists 8.2p1
            Evr Evr String Exists 1:8.2p1-4ubuntu0.11


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.2.2_Ensure_permissions_on_SSH_private_host_key_files_are_configured"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.891-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3. MP-2</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/nix_ssh_private_key_perm_chk.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/nix_ssh_private_key_perm_chk.sh"
                                        xccdf="pass"
                                        script="/root/Assessor/sce/nix_ssh_private_key_perm_chk.sh"
                                        exit-value="101">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  *** PASS ***</l>
                              <l>- * Correctly set * :</l>
                              <l/>
                              <l/>
                           </out>
                           <err>
                              <l>/root/Assessor/sce/nix_ssh_private_key_perm_chk.sh: line 20: file: command not found</l>
                              <l>/root/Assessor/sce/nix_ssh_private_key_perm_chk.sh: line 20: file: command not found</l>
                              <l>/root/Assessor/sce/nix_ssh_private_key_perm_chk.sh: line 20: file: command not found</l>
                              <l>/root/Assessor/sce/nix_ssh_private_key_perm_chk.sh: line 20: file: command not found</l>
                              <l>/root/Assessor/sce/nix_ssh_private_key_perm_chk.sh: line 20: file: command not found</l>
                              <l>/root/Assessor/sce/nix_ssh_private_key_perm_chk.sh: line 20: file: command not found</l>
                              <l>/root/Assessor/sce/nix_ssh_private_key_perm_chk.sh: line 20: file: command not found</l>
                              <l>/root/Assessor/sce/nix_ssh_private_key_perm_chk.sh: line 20: file: command not found</l>
                              <l>/root/Assessor/sce/nix_ssh_private_key_perm_chk.sh: line 20: file: command not found</l>
                              <l>/root/Assessor/sce/nix_ssh_private_key_perm_chk.sh: line 28: &amp; 0177 : syntax error: operand expected (error token is "&amp; 0177 ")</l>
                           </err>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/nix_ssh_private_key_perm_chk.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="pass">Pass</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>101</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  *** PASS ***</li>
                                          <li>- * Correctly set * :</li>
                                          <li/>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Errors:</td>
                                    <td>
                                       <ul>
                                          <li>/root/Assessor/sce/nix_ssh_private_key_perm_chk.sh: line 20: file: command not found</li>
                                          <li>/root/Assessor/sce/nix_ssh_private_key_perm_chk.sh: line 20: file: command not found</li>
                                          <li>/root/Assessor/sce/nix_ssh_private_key_perm_chk.sh: line 20: file: command not found</li>
                                          <li>/root/Assessor/sce/nix_ssh_private_key_perm_chk.sh: line 20: file: command not found</li>
                                          <li>/root/Assessor/sce/nix_ssh_private_key_perm_chk.sh: line 20: file: command not found</li>
                                          <li>/root/Assessor/sce/nix_ssh_private_key_perm_chk.sh: line 20: file: command not found</li>
                                          <li>/root/Assessor/sce/nix_ssh_private_key_perm_chk.sh: line 20: file: command not found</li>
                                          <li>/root/Assessor/sce/nix_ssh_private_key_perm_chk.sh: line 20: file: command not found</li>
                                          <li>/root/Assessor/sce/nix_ssh_private_key_perm_chk.sh: line 20: file: command not found</li>
                                          <li>/root/Assessor/sce/nix_ssh_private_key_perm_chk.sh: line 28: &amp; 0177 : syntax error: operand expected (error token is "&amp; 0177 ")</li>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995119"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995119">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995119"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'openssh-server' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Dpkginfo Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Name</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>openssh-server</td>
                                       </tr>
                                       <tr>
                                          <td>Arch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>amd64</td>
                                       </tr>
                                       <tr>
                                          <td>Epoch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>1</td>
                                       </tr>
                                       <tr>
                                          <td>Release</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>4ubuntu0.11</td>
                                       </tr>
                                       <tr>
                                          <td>Version</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>8.2p1</td>
                                       </tr>
                                       <tr>
                                          <td>Evr</td>
                                          <td>Evr String</td>
                                          <td>Exists</td>
                                          <td>1:8.2p1-4ubuntu0.11</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: AC-3. MP-2

            CIS Controls V7.0:

            • Control 14: Controlled Access Based on the Need to Know: -- More
              CIS Control Information
              Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
              Subcontrol: 14.6
              Label: Protect Information through Access Control Lists
              Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
            • >

            CIS Critical Security Controls V8.0:

            • Control 3: Data Protection: -- More
              CIS Control Information
              Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
              Safeguard: 3.3
              Label: Configure Data Access Control Lists
              Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Pass

            4.2.3 Ensure permissions on SSH public host key files are configured

            Description:

            An SSH public key is one of two files used in SSH public key authentication. In this authentication method, a public key is a key that can be used for verifying digital signatures generated using a corresponding private key. Only a public key that corresponds to a private key will be able to authenticate successfully.

            If a public host key file is modified by an unauthorized user, the SSH service may be compromised.

            Run the following script to set mode, ownership, and group on the public SSH host key files:

            #!/usr/bin/env bash



            {

            l_pmask="0133"

            l_maxperm="$( printf '%o' $(( 0777 & ~$l_pmask )) )"

            awk '{print}' <<< "$(find -L /etc/ssh -xdev -type f -exec stat -Lc "%n %#a %U %G" {} +)" | (while read -r l_file l_mode l_owner l_group; do

            if file "$l_file" | grep -Pq ':\h+OpenSSH\h+(\H+\h+)?public\h+key\b'; then

            echo -e " - Checking private key file: \"$l_file\""

            if [ $(( $l_mode & $l_pmask )) -gt 0 ]; then

            echo -e " - File: \"$l_file\" is mode \"$l_mode\" changing to mode: \"$l_maxperm\""

            chmod u-x,go-wx "$l_file"

            fi

            if [ "$l_owner" != "root" ]; then

            echo -e " - File: \"$l_file\" is owned by: \"$l_owner\" changing owner to \"root\""

            chown root "$l_file"

            fi

            if [ "$l_group" != "root" ]; then

            echo -e " - File: \"$l_file\" is owned by group \"$l_group\" changing to group \"root\""

            chgrp "root" "$l_file"

            fi

            fi

            done

            )

            }

            Show Assessment Evidence
            Complex Check
            OR
            Script: sce/nix_ssh_public_key_chk.sh
            Result: Pass
            Exit Value: 101
            Output:
            • - Audit Result:
            • *** PASS ***
            Errors:
            • /root/Assessor/sce/nix_ssh_public_key_chk.sh: line 14: file: command not found
            • /root/Assessor/sce/nix_ssh_public_key_chk.sh: line 14: file: command not found
            • /root/Assessor/sce/nix_ssh_public_key_chk.sh: line 14: file: command not found
            • /root/Assessor/sce/nix_ssh_public_key_chk.sh: line 14: file: command not found
            • /root/Assessor/sce/nix_ssh_public_key_chk.sh: line 14: file: command not found
            • /root/Assessor/sce/nix_ssh_public_key_chk.sh: line 14: file: command not found
            • /root/Assessor/sce/nix_ssh_public_key_chk.sh: line 14: file: command not found
            • /root/Assessor/sce/nix_ssh_public_key_chk.sh: line 14: file: command not found
            • /root/Assessor/sce/nix_ssh_public_key_chk.sh: line 14: file: command not found
            Criterion: Ensure package name equals 'openssh-server' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Fail
            Dpkginfo Item
            Name Type Status Value
            Name String Exists openssh-server
            Arch String Exists amd64
            Epoch String Exists 1
            Release String Exists 4ubuntu0.11
            Version String Exists 8.2p1
            Evr Evr String Exists 1:8.2p1-4ubuntu0.11


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.2.3_Ensure_permissions_on_SSH_public_host_key_files_are_configured"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.891-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/5/subcontrol/1"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3. MP-2</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="sce/nix_ssh_public_key_chk.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/nix_ssh_public_key_chk.sh"
                                        xccdf="pass"
                                        script="/root/Assessor/sce/nix_ssh_public_key_chk.sh"
                                        exit-value="101">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  *** PASS ***</l>
                              <l/>
                           </out>
                           <err>
                              <l>/root/Assessor/sce/nix_ssh_public_key_chk.sh: line 14: file: command not found</l>
                              <l>/root/Assessor/sce/nix_ssh_public_key_chk.sh: line 14: file: command not found</l>
                              <l>/root/Assessor/sce/nix_ssh_public_key_chk.sh: line 14: file: command not found</l>
                              <l>/root/Assessor/sce/nix_ssh_public_key_chk.sh: line 14: file: command not found</l>
                              <l>/root/Assessor/sce/nix_ssh_public_key_chk.sh: line 14: file: command not found</l>
                              <l>/root/Assessor/sce/nix_ssh_public_key_chk.sh: line 14: file: command not found</l>
                              <l>/root/Assessor/sce/nix_ssh_public_key_chk.sh: line 14: file: command not found</l>
                              <l>/root/Assessor/sce/nix_ssh_public_key_chk.sh: line 14: file: command not found</l>
                              <l>/root/Assessor/sce/nix_ssh_public_key_chk.sh: line 14: file: command not found</l>
                           </err>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/nix_ssh_public_key_chk.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="pass">Pass</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>101</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  *** PASS ***</li>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Errors:</td>
                                    <td>
                                       <ul>
                                          <li>/root/Assessor/sce/nix_ssh_public_key_chk.sh: line 14: file: command not found</li>
                                          <li>/root/Assessor/sce/nix_ssh_public_key_chk.sh: line 14: file: command not found</li>
                                          <li>/root/Assessor/sce/nix_ssh_public_key_chk.sh: line 14: file: command not found</li>
                                          <li>/root/Assessor/sce/nix_ssh_public_key_chk.sh: line 14: file: command not found</li>
                                          <li>/root/Assessor/sce/nix_ssh_public_key_chk.sh: line 14: file: command not found</li>
                                          <li>/root/Assessor/sce/nix_ssh_public_key_chk.sh: line 14: file: command not found</li>
                                          <li>/root/Assessor/sce/nix_ssh_public_key_chk.sh: line 14: file: command not found</li>
                                          <li>/root/Assessor/sce/nix_ssh_public_key_chk.sh: line 14: file: command not found</li>
                                          <li>/root/Assessor/sce/nix_ssh_public_key_chk.sh: line 14: file: command not found</li>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995129"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995129">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995129"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'openssh-server' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Dpkginfo Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Name</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>openssh-server</td>
                                       </tr>
                                       <tr>
                                          <td>Arch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>amd64</td>
                                       </tr>
                                       <tr>
                                          <td>Epoch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>1</td>
                                       </tr>
                                       <tr>
                                          <td>Release</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>4ubuntu0.11</td>
                                       </tr>
                                       <tr>
                                          <td>Version</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>8.2p1</td>
                                       </tr>
                                       <tr>
                                          <td>Evr</td>
                                          <td>Evr String</td>
                                          <td>Exists</td>
                                          <td>1:8.2p1-4ubuntu0.11</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: AC-3. MP-2

            CIS Controls V7.0:

            • Control 5: Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers: -- More
              CIS Control Information
              Control: Establish, implement, and actively manage (track, report on, correct) the security configuration of mobile devices, laptops, servers, and workstations using a rigorous configuration management and change control process in order to prevent attackers from exploiting vulnerable services and settings.
              Subcontrol: 5.1
              Label: Establish Secure Configurations
              Description: Maintain documented, standard security configuration standards for all authorized operating systems and software.
            • >

            CIS Critical Security Controls V8.0:

            • Control 3: Data Protection: -- More
              CIS Control Information
              Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
              Safeguard: 3.3
              Label: Configure Data Access Control Lists
              Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Fail

            4.2.4 Ensure SSH access is limited

            Description:

            There are several options available to limit which users and group can access the system via SSH. It is recommended that at least one of the following options be leveraged:

            • AllowUsers :
              • The AllowUsers variable gives the system administrator the option of allowing specific users to ssh into the system. The list consists of space separated user names. Numeric user IDs are not recognized with this variable. If a system administrator wants to restrict user access further by only allowing the allowed users to log in from a particular host, the entry can be specified in the form of user@host.
            • AllowGroups :
              • The AllowGroups variable gives the system administrator the option of allowing specific groups of users to ssh into the system. The list consists of space separated group names. Numeric group IDs are not recognized with this variable.
            • DenyUsers :
              • The DenyUsers variable gives the system administrator the option of denying specific users to ssh into the system. The list consists of space separated user names. Numeric user IDs are not recognized with this variable. If a system administrator wants to restrict user access further by specifically denying a user's access from a particular host, the entry can be specified in the form of user@host.
            • DenyGroups :
              • The DenyGroups variable gives the system administrator the option of denying specific groups of users to ssh into the system. The list consists of space separated group names. Numeric group IDs are not recognized with this variable.

            Restricting which users can remotely access the system via SSH will help ensure that only authorized users access the system.

            Edit the /etc/ssh/sshd_config file to set one or more of the parameter above any Include entries as follows:

            AllowUsers <userlist>

            OR

            AllowGroups <grouplist>

            OR

            DenyUsers <userlist>

            OR

            DenyGroups <grouplist>

            Note: First occurrence of a option takes precedence, Match set statements withstanding. If Include locations are enabled, used, and order of precedence is understood in your environment, the entry may be created in a file in Include location. If the Include location is not the default, /etc/ssh/sshd_config.d/*.conf , the audit will need to be modified to account for the Include location used.

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Complex Check
            OR
            Criterion: Ensure at least one file named /etc/ssh/sshd_config exists and matches pattern ^\h*(?i)(allow|deny)(users|groups)\h+"?\H+"?\b
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            No matching system items were found.
            Criterion: Ensure at least one file(s) named ^.+\.conf$ in /etc/ssh/sshd_config.d/ exists and matches pattern ^\h*(?i)(allow|deny)(users|groups)\h+"?\H+"?\b
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            No matching system items were found.
            Script: sce/sshd_running_config.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - check sshd parameter: "allowusers|allowgroups|denyusers|denygroups"
            No error lines were collected.
            Criterion: Ensure package name equals 'openssh-server' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Fail
            Dpkginfo Item
            Name Type Status Value
            Name String Exists openssh-server
            Arch String Exists amd64
            Epoch String Exists 1
            Release String Exists 4ubuntu0.11
            Version String Exists 8.2p1
            Evr Evr String Exists 1:8.2p1-4ubuntu0.11


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.2.4_Ensure_SSH_access_is_limited"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.891-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/4/subcontrol/3"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">SSHD_CONFIG(5)</xccdf:ident>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3. MP-2</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:complex-check operator="OR" negate="false">
                        <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-content-ref href="#OVAL-Results-1"
                                                    name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995145"/>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="definition"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995145">
                                 <div class="criteria">
                                    <div class="criterion"
                                         id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995145"
                                         check="all"
                                         check_existence="at_least_one_exists">
                                       <table class="evidence-sep" width="100%">
                                          <tbody class="tbe">
                                             <tr>
                                                <td class="bold">Criterion:</td>
                                                <td>Ensure at least one file named /etc/ssh/sshd_config exists and matches pattern ^\h*(?i)(allow|deny)(users|groups)\h+"?\H+"?\b</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Existence Check:</td>
                                                <td>At Least One Exists</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Item Check:</td>
                                                <td>All</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Result:</td>
                                                <td class="fail">Fail</td>
                                             </tr>
                                          </tbody>
                                       </table>
                                       <table class="evidence" width="100%">
                                          <tr>
                                             <td>No matching system items were found.</td>
                                          </tr>
                                       </table>
                                    </div>
                                 </div>
                              </div>
                           </evidence>
                        </xccdf:check>
                        <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-content-ref href="#OVAL-Results-1"
                                                    name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995150"/>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="definition"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995150">
                                 <div class="criteria">
                                    <div class="criterion"
                                         id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995150"
                                         check="all"
                                         check_existence="at_least_one_exists">
                                       <table class="evidence-sep" width="100%">
                                          <tbody class="tbe">
                                             <tr>
                                                <td class="bold">Criterion:</td>
                                                <td>Ensure at least one file(s) named ^.+\.conf$ in /etc/ssh/sshd_config.d/ exists and matches pattern ^\h*(?i)(allow|deny)(users|groups)\h+"?\H+"?\b</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Existence Check:</td>
                                                <td>At Least One Exists</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Item Check:</td>
                                                <td>All</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Result:</td>
                                                <td class="fail">Fail</td>
                                             </tr>
                                          </tbody>
                                       </table>
                                       <table class="evidence" width="100%">
                                          <tr>
                                             <td>No matching system items were found.</td>
                                          </tr>
                                       </table>
                                    </div>
                                 </div>
                              </div>
                           </evidence>
                        </xccdf:check>
                     </xccdf:complex-check>
                     <xccdf:check system="http://open-scap.org/page/SCE"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                            value-id="xccdf_org.cisecurity.benchmarks_value_3995135_var"/>
                        <xccdf:check-content-ref href="sce/sshd_running_config.sh"/>
                        <xccdf:check-content>
                           <command_result href="sce/sshd_running_config.sh"
                                           xccdf="fail"
                                           script="/root/Assessor/sce/sshd_running_config.sh"
                                           exit-value="102">
                              <out>
                                 <l/>
                                 <l>- Audit Result:</l>
                                 <l>  ** FAIL **</l>
                                 <l> - Reason(s) for audit failure:</l>
                                 <l> - check sshd parameter: "allowusers|allowgroups|denyusers|denygroups"</l>
                              </out>
                              <err/>
                              <env/>
                           </command_result>
                        </xccdf:check-content>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="sce">
                              <table class="evidence-sep" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Script:</td>
                                       <td>sce/sshd_running_config.sh</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Result:</td>
                                       <td class="fail">Fail</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Exit Value:</td>
                                       <td>102</td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Output:</td>
                                       <td>
                                          <ul class="unstyled">
                                             <li/>
                                             <li>- Audit Result:</li>
                                             <li>  ** FAIL **</li>
                                             <li> - Reason(s) for audit failure:</li>
                                             <li> - check sshd parameter: "allowusers|allowgroups|denyusers|denygroups"</li>
                                          </ul>
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td>No error lines were collected.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995140"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995140">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995140"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'openssh-server' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Dpkginfo Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Name</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>openssh-server</td>
                                       </tr>
                                       <tr>
                                          <td>Arch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>amd64</td>
                                       </tr>
                                       <tr>
                                          <td>Epoch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>1</td>
                                       </tr>
                                       <tr>
                                          <td>Release</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>4ubuntu0.11</td>
                                       </tr>
                                       <tr>
                                          <td>Version</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>8.2p1</td>
                                       </tr>
                                       <tr>
                                          <td>Evr</td>
                                          <td>Evr String</td>
                                          <td>Exists</td>
                                          <td>1:8.2p1-4ubuntu0.11</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: SSHD_CONFIG(5)
            • URL: NIST SP 800-53 Rev. 5: AC-3. MP-2

            CIS Controls V7.0:

            • Control 4: Controlled Use of Administrative Privileges: -- More
              CIS Control Information
              Control: The processes and tools used to track/control/prevent/correct the use, assignment, and configuration of administrative privileges on computers, networks, and applications.
              Subcontrol: 4.3
              Label: Ensure the Use of Dedicated Administrative Accounts
              Description: Ensure that all users with administrative account access use a dedicated or secondary account for elevated activities. This account should only be used for administrative activities and not internet browsing, email, or similar activities.
            • >

            CIS Critical Security Controls V8.0:

            • Control 3: Data Protection: -- More
              CIS Control Information
              Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
              Safeguard: 3.3
              Label: Configure Data Access Control Lists
              Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Pass

            4.2.5 Ensure SSH LogLevel is appropriate

            Description:

            INFO level is the basic level that only records login activity of SSH users. In many situations, such as Incident Response, it is important to determine when a particular user was active on a system. The logout record can eliminate those users who disconnected, which helps narrow the field.

            VERBOSE level specifies that login and logout activity as well as the key fingerprint for any SSH key used for login will be logged. This information is important for SSH key management, especially in legacy environments.

            SSH provides several logging levels with varying amounts of verbosity. DEBUG is specifically not recommended other than strictly for debugging SSH communications since it provides so much data that it is difficult to identify important security information.

            Edit the /etc/ssh/sshd_config file to set the parameter above any Include entries as follows:

            LogLevel VERBOSE

            OR

            LogLevel INFO

            Note: First occurrence of a option takes precedence, Match set statements withstanding. If Include locations are enabled, used, and order of precedence is understood in your environment, the entry may be created in a file in Include location.

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Complex Check
            AND
            Script: sce/sshd_running_config.sh
            Result: Pass
            Exit Value: 101
            Output:
            • - Audit Result:
            • ** PASS **
            • - sshd parameter: "loglevel INFO"
            No error lines were collected.
            Criterion: Ensure no file named /etc/ssh/sshd_config exists and matches pattern ^(?i)\s*LogLevel\s+(QUIET|FATAL|ERROR|DEBUG|DEBUG1|DEBUG2|DEBUG3)
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensurefile(s) named ^.+\.conf$ in /etc/ssh/sshd_config.d/ exists and matches pattern ^(?i)\h*LogLevel\h+\"?(QUIET|FATAL|ERROR|DEBUG|DEBUG1|DEBUG2|DEBUG3)\"?\b
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensure package name equals 'openssh-server' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Fail
            Dpkginfo Item
            Name Type Status Value
            Name String Exists openssh-server
            Arch String Exists amd64
            Epoch String Exists 1
            Release String Exists 4ubuntu0.11
            Version String Exists 8.2p1
            Evr Evr String Exists 1:8.2p1-4ubuntu0.11


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.2.5_Ensure_SSH_LogLevel_is_appropriate"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.891-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/3"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/8/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">https://www.ssh.com/ssh/sshd_config/</xccdf:ident>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AU-3, AU-12, SI-5</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:complex-check operator="AND" negate="false">
                        <xccdf:check system="http://open-scap.org/page/SCE"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                               value-id="xccdf_org.cisecurity.benchmarks_value_3995157_var"/>
                           <xccdf:check-content-ref href="sce/sshd_running_config.sh"/>
                           <xccdf:check-content>
                              <command_result href="sce/sshd_running_config.sh"
                                              xccdf="pass"
                                              script="/root/Assessor/sce/sshd_running_config.sh"
                                              exit-value="101">
                                 <out>
                                    <l/>
                                    <l>- Audit Result:</l>
                                    <l>  ** PASS **</l>
                                    <l> - sshd parameter: "loglevel INFO"</l>
                                 </out>
                                 <err/>
                                 <env/>
                              </command_result>
                           </xccdf:check-content>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="sce">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Script:</td>
                                          <td>sce/sshd_running_config.sh</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Exit Value:</td>
                                          <td>101</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Output:</td>
                                          <td>
                                             <ul class="unstyled">
                                                <li/>
                                                <li>- Audit Result:</li>
                                                <li>  ** PASS **</li>
                                                <li> - sshd parameter: "loglevel INFO"</li>
                                             </ul>
                                          </td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td>No error lines were collected.</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </evidence>
                        </xccdf:check>
                        <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-content-ref href="#OVAL-Results-1"
                                                    name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995165"/>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="definition"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995165">
                                 <div class="criteria">
                                    <div class="criterion"
                                         id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995165"
                                         check="all"
                                         check_existence="none_exist">
                                       <table class="evidence-sep" width="100%">
                                          <tbody class="tbe">
                                             <tr>
                                                <td class="bold">Criterion:</td>
                                                <td>Ensure no file named /etc/ssh/sshd_config exists and matches pattern ^(?i)\s*LogLevel\s+(QUIET|FATAL|ERROR|DEBUG|DEBUG1|DEBUG2|DEBUG3)</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Existence Check:</td>
                                                <td>None Exist</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Item Check:</td>
                                                <td>All</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Result:</td>
                                                <td class="pass">Pass</td>
                                             </tr>
                                          </tbody>
                                       </table>
                                       <table class="evidence" width="100%">
                                          <tr>
                                             <td>No matching system items were found.</td>
                                          </tr>
                                       </table>
                                    </div>
                                 </div>
                              </div>
                           </evidence>
                        </xccdf:check>
                     </xccdf:complex-check>
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995171"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995171">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995171"
                                      check="all"
                                      check_existence="none_exist">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensurefile(s) named ^.+\.conf$ in /etc/ssh/sshd_config.d/ exists and matches pattern ^(?i)\h*LogLevel\h+\"?(QUIET|FATAL|ERROR|DEBUG|DEBUG1|DEBUG2|DEBUG3)\"?\b</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>None Exist</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995162"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995162">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995162"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'openssh-server' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Dpkginfo Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Name</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>openssh-server</td>
                                       </tr>
                                       <tr>
                                          <td>Arch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>amd64</td>
                                       </tr>
                                       <tr>
                                          <td>Epoch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>1</td>
                                       </tr>
                                       <tr>
                                          <td>Release</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>4ubuntu0.11</td>
                                       </tr>
                                       <tr>
                                          <td>Version</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>8.2p1</td>
                                       </tr>
                                       <tr>
                                          <td>Evr</td>
                                          <td>Evr String</td>
                                          <td>Exists</td>
                                          <td>1:8.2p1-4ubuntu0.11</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: https://www.ssh.com/ssh/sshd_config/
            • URL: NIST SP 800-53 Rev. 5: AU-3, AU-12, SI-5

            CIS Controls V7.0:

            • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
              CIS Control Information
              Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
              Subcontrol: 6.2
              Label: Activate audit logging
              Description: Ensure that local logging has been enabled on all systems and networking devices.
            • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
              CIS Control Information
              Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
              Subcontrol: 6.3
              Label: Enable Detailed Logging
              Description: Enable system logging to include detailed information such as a event source, date, user, timestamp, source addresses, destination addresses, and other useful elements.
            • >

            CIS Critical Security Controls V8.0:

            • Control 8: Audit Log Management: -- More
              CIS Control Information
              Control: Collect, alert, review, and retain audit logs of events that could help detect, understand, or recover from an attack.
              Safeguard: 8.2
              Label: Collect Audit Logs
              Description: Collect audit logs. Ensure that logging, per the enterprise's audit log management process, has been enabled across enterprise assets.
              Implementation Group: IG-1
              Security Function: Detect
            • >

            Pass

            4.2.6 Ensure SSH PAM is enabled

            Description:

            The UsePAM directive enables the Pluggable Authentication Module (PAM) interface. If set to yes this will enable PAM authentication using ChallengeResponseAuthentication and PasswordAuthentication directives in addition to PAM account and session module processing for all authentication types.

            When usePAM is set to yes , PAM runs through account and session types properly. This is important if you want to restrict access to services based off of IP, time or other factors of the account. Additionally, you can make sure users inherit certain environment variables on login or disallow access to the server

            Edit the /etc/ssh/sshd_config file to set the parameter above any Include entries as follows:

            UsePAM yes

            Note: First occurrence of a option takes precedence. If Include locations are enabled, used, and order of precedence is understood in your environment, the entry may be created in a file in Include location.

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Complex Check
            AND
            Script: sce/sshd_running_config.sh
            Result: Pass
            Exit Value: 101
            Output:
            • - Audit Result:
            • ** PASS **
            • - sshd parameter: "usepam yes"
            No error lines were collected.
            Criterion: Ensure no file named /etc/ssh/sshd_config exists and matches pattern ^(?i)\h*UsePAM\h+"?no"?\b
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensure no file(s) named ^.+\.conf$ in /etc/ssh/sshd_config.d/ exists and matches pattern ^(?i)\h*UsePAM\h+"?no"?\b
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensure package name equals 'openssh-server' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Fail
            Dpkginfo Item
            Name Type Status Value
            Name String Exists openssh-server
            Arch String Exists amd64
            Epoch String Exists 1
            Release String Exists 4ubuntu0.11
            Version String Exists 8.2p1
            Evr Evr String Exists 1:8.2p1-4ubuntu0.11


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.2.6_Ensure_SSH_PAM_is_enabled"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.892-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/5/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">SSHD_CONFIG(5)</xccdf:ident>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:complex-check operator="AND" negate="false">
                        <xccdf:check system="http://open-scap.org/page/SCE"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                               value-id="xccdf_org.cisecurity.benchmarks_value_3995177_var"/>
                           <xccdf:check-content-ref href="sce/sshd_running_config.sh"/>
                           <xccdf:check-content>
                              <command_result href="sce/sshd_running_config.sh"
                                              xccdf="pass"
                                              script="/root/Assessor/sce/sshd_running_config.sh"
                                              exit-value="101">
                                 <out>
                                    <l/>
                                    <l>- Audit Result:</l>
                                    <l>  ** PASS **</l>
                                    <l> - sshd parameter: "usepam yes"</l>
                                 </out>
                                 <err/>
                                 <env/>
                              </command_result>
                           </xccdf:check-content>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="sce">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Script:</td>
                                          <td>sce/sshd_running_config.sh</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Exit Value:</td>
                                          <td>101</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Output:</td>
                                          <td>
                                             <ul class="unstyled">
                                                <li/>
                                                <li>- Audit Result:</li>
                                                <li>  ** PASS **</li>
                                                <li> - sshd parameter: "usepam yes"</li>
                                             </ul>
                                          </td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td>No error lines were collected.</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </evidence>
                        </xccdf:check>
                        <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-content-ref href="#OVAL-Results-1"
                                                    name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995184"/>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="definition"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995184">
                                 <div class="criteria">
                                    <div class="criterion"
                                         id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995184"
                                         check="all"
                                         check_existence="none_exist">
                                       <table class="evidence-sep" width="100%">
                                          <tbody class="tbe">
                                             <tr>
                                                <td class="bold">Criterion:</td>
                                                <td>Ensure no file named /etc/ssh/sshd_config exists and matches pattern ^(?i)\h*UsePAM\h+"?no"?\b</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Existence Check:</td>
                                                <td>None Exist</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Item Check:</td>
                                                <td>All</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Result:</td>
                                                <td class="pass">Pass</td>
                                             </tr>
                                          </tbody>
                                       </table>
                                       <table class="evidence" width="100%">
                                          <tr>
                                             <td>No matching system items were found.</td>
                                          </tr>
                                       </table>
                                    </div>
                                 </div>
                              </div>
                           </evidence>
                        </xccdf:check>
                     </xccdf:complex-check>
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995188"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995188">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995188"
                                      check="all"
                                      check_existence="none_exist">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure no file(s) named ^.+\.conf$ in /etc/ssh/sshd_config.d/ exists and matches pattern ^(?i)\h*UsePAM\h+"?no"?\b</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>None Exist</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995180"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995180">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995180"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'openssh-server' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Dpkginfo Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Name</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>openssh-server</td>
                                       </tr>
                                       <tr>
                                          <td>Arch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>amd64</td>
                                       </tr>
                                       <tr>
                                          <td>Epoch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>1</td>
                                       </tr>
                                       <tr>
                                          <td>Release</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>4ubuntu0.11</td>
                                       </tr>
                                       <tr>
                                          <td>Version</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>8.2p1</td>
                                       </tr>
                                       <tr>
                                          <td>Evr</td>
                                          <td>Evr String</td>
                                          <td>Exists</td>
                                          <td>1:8.2p1-4ubuntu0.11</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: SSHD_CONFIG(5)
            • URL: NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5

            CIS Controls V7.0:

            • Control 4: Controlled Use of Administrative Privileges: -- More
              CIS Control Information
              Control: The processes and tools used to track/control/prevent/correct the use, assignment, and configuration of administrative privileges on computers, networks, and applications.
              Subcontrol: 4.4
              Label: Use Unique Passwords
              Description: Where multi-factor authentication is not supported (such as local administrator, root, or service accounts), accounts will use passwords that are unique to that system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 5: Account Management: -- More
              CIS Control Information
              Control: Use processes and tools to assign and manage authorization to credentials for user accounts, including administrator accounts, as well as service accounts, to enterprise assets and software.
              Safeguard: 5.2
              Label: Use Unique Passwords
              Description: Use unique passwords for all enterprise assets. Best practice implementation includes, at a minimum, an 8-character password for accounts using MFA and a 14-character password for accounts not using MFA.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Fail

            4.2.7 Ensure SSH root login is disabled

            Description:

            The PermitRootLogin parameter specifies if the root user can log in using SSH. The default is prohibit-password .

            Disallowing root logins over SSH requires system admins to authenticate using their own individual account, then escalating to root . This limits opportunity for non-repudiation and provides a clear audit trail in the event of a security incident.

            Edit the /etc/ssh/sshd_config file to set the parameter above any Include entries as follows:

            PermitRootLogin no

            Note: First occurrence of a option takes precedence, Match set statements withstanding. If Include locations are enabled, used, and order of precedence is understood in your environment, the entry may be created in a file in Include location.

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Complex Check
            AND
            Script: sce/sshd_running_config.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - check sshd parameter: "permitrootlogin yes"
            No error lines were collected.
            Criterion: Ensure no file named /etc/ssh/sshd_config exists and matches pattern ^(?i)\h*PermitRootLogin\h+"?(yes|prohibit-password|forced-commands-only)"?\b
            Existence Check: None Exist
            Item Check: At least one
            Result: Fail
            Textfilecontent Item
            Name Type Status Value
            Filepath String Exists /etc/ssh/sshd_config
            Path String Exists /etc/ssh
            Filename String Exists sshd_config
            Pattern String Exists OBFUSCATED [PWD]
            Instance Int Exists 1
            Line String Exists PermitRootLogin yes
            Text String Exists PermitRootLogin yes
            Subexpression String Exists yes
            Windows View String Not collected No Value
            Criterion: Ensure no file(s) named ^.+\.conf$ in /etc/ssh/sshd_config.d/ exists and matches pattern ^(?i)\h*PermitRootLogin\h+"?(yes|prohibit-password|forced-commands-only)"?\b
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensure package name equals 'openssh-server' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Fail
            Dpkginfo Item
            Name Type Status Value
            Name String Exists openssh-server
            Arch String Exists amd64
            Epoch String Exists 1
            Release String Exists 4ubuntu0.11
            Version String Exists 8.2p1
            Evr Evr String Exists 1:8.2p1-4ubuntu0.11


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.2.7_Ensure_SSH_root_login_is_disabled"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.892-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/4/subcontrol/3"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/5/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">SSHD_CONFIG(5)</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:complex-check operator="AND" negate="false">
                        <xccdf:check system="http://open-scap.org/page/SCE"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                               value-id="xccdf_org.cisecurity.benchmarks_value_3995194_var"/>
                           <xccdf:check-content-ref href="sce/sshd_running_config.sh"/>
                           <xccdf:check-content>
                              <command_result href="sce/sshd_running_config.sh"
                                              xccdf="fail"
                                              script="/root/Assessor/sce/sshd_running_config.sh"
                                              exit-value="102">
                                 <out>
                                    <l/>
                                    <l>- Audit Result:</l>
                                    <l>  ** FAIL **</l>
                                    <l> - Reason(s) for audit failure:</l>
                                    <l> - check sshd parameter: "permitrootlogin yes"</l>
                                 </out>
                                 <err/>
                                 <env/>
                              </command_result>
                           </xccdf:check-content>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="sce">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Script:</td>
                                          <td>sce/sshd_running_config.sh</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Exit Value:</td>
                                          <td>102</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Output:</td>
                                          <td>
                                             <ul class="unstyled">
                                                <li/>
                                                <li>- Audit Result:</li>
                                                <li>  ** FAIL **</li>
                                                <li> - Reason(s) for audit failure:</li>
                                                <li> - check sshd parameter: "permitrootlogin yes"</li>
                                             </ul>
                                          </td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td>No error lines were collected.</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </evidence>
                        </xccdf:check>
                        <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-content-ref href="#OVAL-Results-1"
                                                    name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995202"/>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="definition"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995202">
                                 <div class="criteria">
                                    <div class="criterion"
                                         id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995202"
                                         check="at least one"
                                         check_existence="none_exist">
                                       <table class="evidence-sep" width="100%">
                                          <tbody class="tbe">
                                             <tr>
                                                <td class="bold">Criterion:</td>
                                                <td>Ensure no file named /etc/ssh/sshd_config exists and matches pattern ^(?i)\h*PermitRootLogin\h+"?(yes|prohibit-password|forced-commands-only)"?\b</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Existence Check:</td>
                                                <td>None Exist</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Item Check:</td>
                                                <td>At least one</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Result:</td>
                                                <td class="fail">Fail</td>
                                             </tr>
                                          </tbody>
                                       </table>
                                       <table class="evidence" width="100%">
                                          <caption>Textfilecontent Item</caption>
                                          <thead>
                                             <tr>
                                                <th scope="col">Name</th>
                                                <th scope="col">Type</th>
                                                <th scope="col">Status</th>
                                                <th scope="col">Value</th>
                                             </tr>
                                          </thead>
                                          <tbody class="tbe">
                                             <tr>
                                                <td>Filepath</td>
                                                <td>String</td>
                                                <td>Exists</td>
                                                <td>/etc/ssh/sshd_config</td>
                                             </tr>
                                             <tr>
                                                <td>Path</td>
                                                <td>String</td>
                                                <td>Exists</td>
                                                <td>/etc/ssh</td>
                                             </tr>
                                             <tr>
                                                <td>Filename</td>
                                                <td>String</td>
                                                <td>Exists</td>
                                                <td>sshd_config</td>
                                             </tr>
                                             <tr>
                                                <td>Pattern</td>
                                                <td>String</td>
                                                <td>Exists</td>
                                                <td>OBFUSCATED [PWD]</td>
                                             </tr>
                                             <tr>
                                                <td>Instance</td>
                                                <td>Int</td>
                                                <td>Exists</td>
                                                <td>1</td>
                                             </tr>
                                             <tr>
                                                <td>Line</td>
                                                <td>String</td>
                                                <td>Exists</td>
                                                <td>PermitRootLogin yes</td>
                                             </tr>
                                             <tr>
                                                <td>Text</td>
                                                <td>String</td>
                                                <td>Exists</td>
                                                <td>PermitRootLogin yes</td>
                                             </tr>
                                             <tr>
                                                <td>Subexpression</td>
                                                <td>String</td>
                                                <td>Exists</td>
                                                <td>yes</td>
                                             </tr>
                                             <tr>
                                                <td>Windows View</td>
                                                <td>String</td>
                                                <td>Not collected</td>
                                                <td>No Value</td>
                                             </tr>
                                          </tbody>
                                       </table>
                                    </div>
                                 </div>
                              </div>
                           </evidence>
                        </xccdf:check>
                     </xccdf:complex-check>
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995204"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995204">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995204"
                                      check="all"
                                      check_existence="none_exist">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure no file(s) named ^.+\.conf$ in /etc/ssh/sshd_config.d/ exists and matches pattern ^(?i)\h*PermitRootLogin\h+"?(yes|prohibit-password|forced-commands-only)"?\b</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>None Exist</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995198"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995198">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995198"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'openssh-server' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Dpkginfo Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Name</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>openssh-server</td>
                                       </tr>
                                       <tr>
                                          <td>Arch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>amd64</td>
                                       </tr>
                                       <tr>
                                          <td>Epoch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>1</td>
                                       </tr>
                                       <tr>
                                          <td>Release</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>4ubuntu0.11</td>
                                       </tr>
                                       <tr>
                                          <td>Version</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>8.2p1</td>
                                       </tr>
                                       <tr>
                                          <td>Evr</td>
                                          <td>Evr String</td>
                                          <td>Exists</td>
                                          <td>1:8.2p1-4ubuntu0.11</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: SSHD_CONFIG(5)

            CIS Controls V7.0:

            • Control 4: Controlled Use of Administrative Privileges: -- More
              CIS Control Information
              Control: The processes and tools used to track/control/prevent/correct the use, assignment, and configuration of administrative privileges on computers, networks, and applications.
              Subcontrol: 4.3
              Label: Ensure the Use of Dedicated Administrative Accounts
              Description: Ensure that all users with administrative account access use a dedicated or secondary account for elevated activities. This account should only be used for administrative activities and not internet browsing, email, or similar activities.
            • >

            CIS Critical Security Controls V8.0:

            • Control 5: Account Management: -- More
              CIS Control Information
              Control: Use processes and tools to assign and manage authorization to credentials for user accounts, including administrator accounts, as well as service accounts, to enterprise assets and software.
              Safeguard: 5.4
              Label: Restrict Administrator Privileges to Dedicated Administrator Accounts
              Description: Restrict administrator privileges to dedicated administrator accounts on enterprise assets. Conduct general computing activities, such as internet browsing, email, and productivity suite use, from the user's primary, non-privileged account.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Pass

            4.2.8 Ensure SSH HostbasedAuthentication is disabled

            Description:

            The HostbasedAuthentication parameter specifies if authentication is allowed through trusted hosts via the user of .rhosts , or /etc/hosts.equiv , along with successful public key client host authentication.

            Even though the .rhosts files are ineffective if support is disabled in /etc/pam.conf , disabling the ability to use .rhosts files in SSH provides an additional layer of protection.

            Edit the /etc/ssh/sshd_config file to set the parameter above any Include entries as follows:

            HostbasedAuthentication no

            Note: First occurrence of a option takes precedence, Match set statements withstanding. If Include locations are enabled, used, and order of precedence is understood in your environment, the entry may be created in a file in Include location.

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Complex Check
            AND
            Script: sce/sshd_running_config.sh
            Result: Pass
            Exit Value: 101
            Output:
            • - Audit Result:
            • ** PASS **
            • - sshd parameter: "hostbasedauthentication no"
            No error lines were collected.
            Criterion: Ensure no file named /etc/ssh/sshd_config exists and matches pattern ^(?i)\h*HostbasedAuthentication\h+"?yes"?\b
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensure no file(s) named ^.+\.conf$ in /etc/ssh/sshd_config.d/ exists and matches pattern ^(?i)\h*HostbasedAuthentication\h+"?yes"?\b
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensure package name equals 'openssh-server' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Fail
            Dpkginfo Item
            Name Type Status Value
            Name String Exists openssh-server
            Arch String Exists amd64
            Epoch String Exists 1
            Release String Exists 4ubuntu0.11
            Version String Exists 8.2p1
            Evr Evr String Exists 1:8.2p1-4ubuntu0.11


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.2.8_Ensure_SSH_HostbasedAuthentication_is_disabled"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.892-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident system="URL">SSHD_CONFIG(5)</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:complex-check operator="AND" negate="false">
                        <xccdf:check system="http://open-scap.org/page/SCE"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                               value-id="xccdf_org.cisecurity.benchmarks_value_3995210_var"/>
                           <xccdf:check-content-ref href="sce/sshd_running_config.sh"/>
                           <xccdf:check-content>
                              <command_result href="sce/sshd_running_config.sh"
                                              xccdf="pass"
                                              script="/root/Assessor/sce/sshd_running_config.sh"
                                              exit-value="101">
                                 <out>
                                    <l/>
                                    <l>- Audit Result:</l>
                                    <l>  ** PASS **</l>
                                    <l> - sshd parameter: "hostbasedauthentication no"</l>
                                 </out>
                                 <err/>
                                 <env/>
                              </command_result>
                           </xccdf:check-content>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="sce">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Script:</td>
                                          <td>sce/sshd_running_config.sh</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Exit Value:</td>
                                          <td>101</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Output:</td>
                                          <td>
                                             <ul class="unstyled">
                                                <li/>
                                                <li>- Audit Result:</li>
                                                <li>  ** PASS **</li>
                                                <li> - sshd parameter: "hostbasedauthentication no"</li>
                                             </ul>
                                          </td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td>No error lines were collected.</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </evidence>
                        </xccdf:check>
                        <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-content-ref href="#OVAL-Results-1"
                                                    name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995217"/>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="definition"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995217">
                                 <div class="criteria">
                                    <div class="criterion"
                                         id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995217"
                                         check="all"
                                         check_existence="none_exist">
                                       <table class="evidence-sep" width="100%">
                                          <tbody class="tbe">
                                             <tr>
                                                <td class="bold">Criterion:</td>
                                                <td>Ensure no file named /etc/ssh/sshd_config exists and matches pattern ^(?i)\h*HostbasedAuthentication\h+"?yes"?\b</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Existence Check:</td>
                                                <td>None Exist</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Item Check:</td>
                                                <td>All</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Result:</td>
                                                <td class="pass">Pass</td>
                                             </tr>
                                          </tbody>
                                       </table>
                                       <table class="evidence" width="100%">
                                          <tr>
                                             <td>No matching system items were found.</td>
                                          </tr>
                                       </table>
                                    </div>
                                 </div>
                              </div>
                           </evidence>
                        </xccdf:check>
                     </xccdf:complex-check>
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995221"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995221">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995221"
                                      check="all"
                                      check_existence="none_exist">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure no file(s) named ^.+\.conf$ in /etc/ssh/sshd_config.d/ exists and matches pattern ^(?i)\h*HostbasedAuthentication\h+"?yes"?\b</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>None Exist</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995214"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995214">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995214"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'openssh-server' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Dpkginfo Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Name</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>openssh-server</td>
                                       </tr>
                                       <tr>
                                          <td>Arch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>amd64</td>
                                       </tr>
                                       <tr>
                                          <td>Epoch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>1</td>
                                       </tr>
                                       <tr>
                                          <td>Release</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>4ubuntu0.11</td>
                                       </tr>
                                       <tr>
                                          <td>Version</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>8.2p1</td>
                                       </tr>
                                       <tr>
                                          <td>Evr</td>
                                          <td>Evr String</td>
                                          <td>Exists</td>
                                          <td>1:8.2p1-4ubuntu0.11</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: SSHD_CONFIG(5)

            Pass

            4.2.9 Ensure SSH PermitEmptyPasswords is disabled

            Description:

            The PermitEmptyPasswords parameter specifies if the SSH server allows login to accounts with empty password strings.

            Disallowing remote shell access to accounts that have an empty password reduces the probability of unauthorized access to the system.

            Edit the /etc/ssh/sshd_config file to set the parameter above any Include entries as follows:

            PermitEmptyPasswords no

            Note: First occurrence of a option takes precedence, Match set statements withstanding. If Include locations are enabled, used, and order of precedence is understood in your environment, the entry may be created in a file in Include location.

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Complex Check
            AND
            Script: sce/sshd_running_config.sh
            Result: Pass
            Exit Value: 101
            Output:
            • - Audit Result:
            • ** PASS **
            • - sshd parameter: "permitemptypasswords no"
            No error lines were collected.
            Criterion: Ensure no file named /etc/ssh/sshd_config exists and matches pattern ^(?i)\h*PermitEmptyPasswords\h+\"?yes\b
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensurefile(s) named ^.+\.conf$ in /etc/ssh/sshd_config.d/ exists and matches pattern ^(?i)\h*PermitEmptyPasswords\h+\"?yes\b
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensure package name equals 'openssh-server' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Fail
            Dpkginfo Item
            Name Type Status Value
            Name String Exists openssh-server
            Arch String Exists amd64
            Epoch String Exists 1
            Release String Exists 4ubuntu0.11
            Version String Exists 8.2p1
            Evr Evr String Exists 1:8.2p1-4ubuntu0.11


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.2.9_Ensure_SSH_PermitEmptyPasswords_is_disabled"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.892-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/5/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">SSHD_CONFIG(5)</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:complex-check operator="AND" negate="false">
                        <xccdf:check system="http://open-scap.org/page/SCE"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                               value-id="xccdf_org.cisecurity.benchmarks_value_3995227_var"/>
                           <xccdf:check-content-ref href="sce/sshd_running_config.sh"/>
                           <xccdf:check-content>
                              <command_result href="sce/sshd_running_config.sh"
                                              xccdf="pass"
                                              script="/root/Assessor/sce/sshd_running_config.sh"
                                              exit-value="101">
                                 <out>
                                    <l/>
                                    <l>- Audit Result:</l>
                                    <l>  ** PASS **</l>
                                    <l> - sshd parameter: "permitemptypasswords no"</l>
                                 </out>
                                 <err/>
                                 <env/>
                              </command_result>
                           </xccdf:check-content>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="sce">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Script:</td>
                                          <td>sce/sshd_running_config.sh</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Exit Value:</td>
                                          <td>101</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Output:</td>
                                          <td>
                                             <ul class="unstyled">
                                                <li/>
                                                <li>- Audit Result:</li>
                                                <li>  ** PASS **</li>
                                                <li> - sshd parameter: "permitemptypasswords no"</li>
                                             </ul>
                                          </td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td>No error lines were collected.</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </evidence>
                        </xccdf:check>
                        <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-content-ref href="#OVAL-Results-1"
                                                    name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995233"/>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="definition"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995233">
                                 <div class="criteria">
                                    <div class="criterion"
                                         id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995233"
                                         check="all"
                                         check_existence="none_exist">
                                       <table class="evidence-sep" width="100%">
                                          <tbody class="tbe">
                                             <tr>
                                                <td class="bold">Criterion:</td>
                                                <td>Ensure no file named /etc/ssh/sshd_config exists and matches pattern ^(?i)\h*PermitEmptyPasswords\h+\"?yes\b</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Existence Check:</td>
                                                <td>None Exist</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Item Check:</td>
                                                <td>All</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Result:</td>
                                                <td class="pass">Pass</td>
                                             </tr>
                                          </tbody>
                                       </table>
                                       <table class="evidence" width="100%">
                                          <tr>
                                             <td>No matching system items were found.</td>
                                          </tr>
                                       </table>
                                    </div>
                                 </div>
                              </div>
                           </evidence>
                        </xccdf:check>
                     </xccdf:complex-check>
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995236"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995236">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995236"
                                      check="all"
                                      check_existence="none_exist">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensurefile(s) named ^.+\.conf$ in /etc/ssh/sshd_config.d/ exists and matches pattern ^(?i)\h*PermitEmptyPasswords\h+\"?yes\b</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>None Exist</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995229"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995229">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995229"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'openssh-server' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Dpkginfo Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Name</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>openssh-server</td>
                                       </tr>
                                       <tr>
                                          <td>Arch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>amd64</td>
                                       </tr>
                                       <tr>
                                          <td>Epoch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>1</td>
                                       </tr>
                                       <tr>
                                          <td>Release</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>4ubuntu0.11</td>
                                       </tr>
                                       <tr>
                                          <td>Version</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>8.2p1</td>
                                       </tr>
                                       <tr>
                                          <td>Evr</td>
                                          <td>Evr String</td>
                                          <td>Exists</td>
                                          <td>1:8.2p1-4ubuntu0.11</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: SSHD_CONFIG(5)

            CIS Controls V7.0:

            • Control 4: Controlled Use of Administrative Privileges: -- More
              CIS Control Information
              Control: The processes and tools used to track/control/prevent/correct the use, assignment, and configuration of administrative privileges on computers, networks, and applications.
              Subcontrol: 4.4
              Label: Use Unique Passwords
              Description: Where multi-factor authentication is not supported (such as local administrator, root, or service accounts), accounts will use passwords that are unique to that system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 5: Account Management: -- More
              CIS Control Information
              Control: Use processes and tools to assign and manage authorization to credentials for user accounts, including administrator accounts, as well as service accounts, to enterprise assets and software.
              Safeguard: 5.2
              Label: Use Unique Passwords
              Description: Use unique passwords for all enterprise assets. Best practice implementation includes, at a minimum, an 8-character password for accounts using MFA and a 14-character password for accounts not using MFA.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Pass

            4.2.10 Ensure SSH PermitUserEnvironment is disabled

            Description:

            The PermitUserEnvironment option allows users to present environment options to the SSH daemon.

            Permitting users the ability to set environment variables through the SSH daemon could potentially allow users to bypass security controls (e.g. setting an execution path that has SSH executing trojan'd programs)

            Edit the /etc/ssh/sshd_config file to set the parameter above any Include entries as follows:

            PermitUserEnvironment no

            Note: First occurrence of a option takes precedence. If Include locations are enabled, used, and order of precedence is understood in your environment, the entry may be created in a file in Include location.

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Complex Check
            AND
            Script: sce/sshd_running_config.sh
            Result: Pass
            Exit Value: 101
            Output:
            • - Audit Result:
            • ** PASS **
            • - sshd parameter: "permituserenvironment no"
            No error lines were collected.
            Criterion: Ensure no file named /etc/ssh/sshd_config exists and matches pattern ^(?i)\h*PermitUserEnvironment\h+"?yes"?\b
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensure no file(s) named ^.+\.conf$ in /etc/ssh/sshd_config.d/ exists and matches pattern ^(?i)\h*PermitUserEnvironment\h+"?yes"?\b
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensure package name equals 'openssh-server' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Fail
            Dpkginfo Item
            Name Type Status Value
            Name String Exists openssh-server
            Arch String Exists amd64
            Epoch String Exists 1
            Release String Exists 4ubuntu0.11
            Version String Exists 8.2p1
            Evr Evr String Exists 1:8.2p1-4ubuntu0.11


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.2.10_Ensure_SSH_PermitUserEnvironment_is_disabled"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.892-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident system="URL">SSHD_CONFIG(5)</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:complex-check operator="AND" negate="false">
                        <xccdf:check system="http://open-scap.org/page/SCE"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                               value-id="xccdf_org.cisecurity.benchmarks_value_3995239_var"/>
                           <xccdf:check-content-ref href="sce/sshd_running_config.sh"/>
                           <xccdf:check-content>
                              <command_result href="sce/sshd_running_config.sh"
                                              xccdf="pass"
                                              script="/root/Assessor/sce/sshd_running_config.sh"
                                              exit-value="101">
                                 <out>
                                    <l/>
                                    <l>- Audit Result:</l>
                                    <l>  ** PASS **</l>
                                    <l> - sshd parameter: "permituserenvironment no"</l>
                                 </out>
                                 <err/>
                                 <env/>
                              </command_result>
                           </xccdf:check-content>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="sce">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Script:</td>
                                          <td>sce/sshd_running_config.sh</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Exit Value:</td>
                                          <td>101</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Output:</td>
                                          <td>
                                             <ul class="unstyled">
                                                <li/>
                                                <li>- Audit Result:</li>
                                                <li>  ** PASS **</li>
                                                <li> - sshd parameter: "permituserenvironment no"</li>
                                             </ul>
                                          </td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td>No error lines were collected.</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </evidence>
                        </xccdf:check>
                        <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-content-ref href="#OVAL-Results-1"
                                                    name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995244"/>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="definition"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995244">
                                 <div class="criteria">
                                    <div class="criterion"
                                         id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995244"
                                         check="all"
                                         check_existence="none_exist">
                                       <table class="evidence-sep" width="100%">
                                          <tbody class="tbe">
                                             <tr>
                                                <td class="bold">Criterion:</td>
                                                <td>Ensure no file named /etc/ssh/sshd_config exists and matches pattern ^(?i)\h*PermitUserEnvironment\h+"?yes"?\b</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Existence Check:</td>
                                                <td>None Exist</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Item Check:</td>
                                                <td>All</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Result:</td>
                                                <td class="pass">Pass</td>
                                             </tr>
                                          </tbody>
                                       </table>
                                       <table class="evidence" width="100%">
                                          <tr>
                                             <td>No matching system items were found.</td>
                                          </tr>
                                       </table>
                                    </div>
                                 </div>
                              </div>
                           </evidence>
                        </xccdf:check>
                     </xccdf:complex-check>
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995247"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995247">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995247"
                                      check="all"
                                      check_existence="none_exist">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure no file(s) named ^.+\.conf$ in /etc/ssh/sshd_config.d/ exists and matches pattern ^(?i)\h*PermitUserEnvironment\h+"?yes"?\b</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>None Exist</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995242"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995242">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995242"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'openssh-server' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Dpkginfo Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Name</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>openssh-server</td>
                                       </tr>
                                       <tr>
                                          <td>Arch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>amd64</td>
                                       </tr>
                                       <tr>
                                          <td>Epoch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>1</td>
                                       </tr>
                                       <tr>
                                          <td>Release</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>4ubuntu0.11</td>
                                       </tr>
                                       <tr>
                                          <td>Version</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>8.2p1</td>
                                       </tr>
                                       <tr>
                                          <td>Evr</td>
                                          <td>Evr String</td>
                                          <td>Exists</td>
                                          <td>1:8.2p1-4ubuntu0.11</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: SSHD_CONFIG(5)

            Pass

            4.2.11 Ensure SSH IgnoreRhosts is enabled

            Description:

            The IgnoreRhosts parameter specifies that .rhosts and .shosts files will not be used in RhostsRSAAuthentication or HostbasedAuthentication .

            Setting this parameter forces users to enter a password when authenticating with SSH.

            Edit the /etc/ssh/sshd_config file to set the parameter above any Include entries as follows:

            IgnoreRhosts yes

            Note: First occurrence of a option takes precedence, Match set statements withstanding. If Include locations are enabled, used, and order of precedence is understood in your environment, the entry may be created in a file in Include location.

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Complex Check
            AND
            Script: sce/sshd_running_config.sh
            Result: Pass
            Exit Value: 101
            Output:
            • - Audit Result:
            • ** PASS **
            • - sshd parameter: "ignorerhosts yes"
            No error lines were collected.
            Criterion: Ensure no file named /etc/ssh/sshd_config exists and matches pattern ^(?i)\h*ignorerhosts\h+"?no"?\b
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensurefile(s) named ^.+\.conf$ in /etc/ssh/sshd_config.d/ exists and matches pattern ^(?i)\h*ignorerhosts\h+"?no"?\b
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensure package name equals 'openssh-server' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Fail
            Dpkginfo Item
            Name Type Status Value
            Name String Exists openssh-server
            Arch String Exists amd64
            Epoch String Exists 1
            Release String Exists 4ubuntu0.11
            Version String Exists 8.2p1
            Evr Evr String Exists 1:8.2p1-4ubuntu0.11


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.2.11_Ensure_SSH_IgnoreRhosts_is_enabled"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.892-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/5/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">SSHD_CONFIG(5)</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:complex-check operator="AND" negate="false">
                        <xccdf:check system="http://open-scap.org/page/SCE"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                               value-id="xccdf_org.cisecurity.benchmarks_value_3995253_var"/>
                           <xccdf:check-content-ref href="sce/sshd_running_config.sh"/>
                           <xccdf:check-content>
                              <command_result href="sce/sshd_running_config.sh"
                                              xccdf="pass"
                                              script="/root/Assessor/sce/sshd_running_config.sh"
                                              exit-value="101">
                                 <out>
                                    <l/>
                                    <l>- Audit Result:</l>
                                    <l>  ** PASS **</l>
                                    <l> - sshd parameter: "ignorerhosts yes"</l>
                                 </out>
                                 <err/>
                                 <env/>
                              </command_result>
                           </xccdf:check-content>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="sce">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Script:</td>
                                          <td>sce/sshd_running_config.sh</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Exit Value:</td>
                                          <td>101</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Output:</td>
                                          <td>
                                             <ul class="unstyled">
                                                <li/>
                                                <li>- Audit Result:</li>
                                                <li>  ** PASS **</li>
                                                <li> - sshd parameter: "ignorerhosts yes"</li>
                                             </ul>
                                          </td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td>No error lines were collected.</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </evidence>
                        </xccdf:check>
                        <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-content-ref href="#OVAL-Results-1"
                                                    name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995257"/>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="definition"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995257">
                                 <div class="criteria">
                                    <div class="criterion"
                                         id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995257"
                                         check="all"
                                         check_existence="none_exist">
                                       <table class="evidence-sep" width="100%">
                                          <tbody class="tbe">
                                             <tr>
                                                <td class="bold">Criterion:</td>
                                                <td>Ensure no file named /etc/ssh/sshd_config exists and matches pattern ^(?i)\h*ignorerhosts\h+"?no"?\b</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Existence Check:</td>
                                                <td>None Exist</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Item Check:</td>
                                                <td>All</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Result:</td>
                                                <td class="pass">Pass</td>
                                             </tr>
                                          </tbody>
                                       </table>
                                       <table class="evidence" width="100%">
                                          <tr>
                                             <td>No matching system items were found.</td>
                                          </tr>
                                       </table>
                                    </div>
                                 </div>
                              </div>
                           </evidence>
                        </xccdf:check>
                     </xccdf:complex-check>
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995260"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995260">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995260"
                                      check="all"
                                      check_existence="none_exist">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensurefile(s) named ^.+\.conf$ in /etc/ssh/sshd_config.d/ exists and matches pattern ^(?i)\h*ignorerhosts\h+"?no"?\b</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>None Exist</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995256"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995256">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995256"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'openssh-server' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Dpkginfo Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Name</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>openssh-server</td>
                                       </tr>
                                       <tr>
                                          <td>Arch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>amd64</td>
                                       </tr>
                                       <tr>
                                          <td>Epoch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>1</td>
                                       </tr>
                                       <tr>
                                          <td>Release</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>4ubuntu0.11</td>
                                       </tr>
                                       <tr>
                                          <td>Version</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>8.2p1</td>
                                       </tr>
                                       <tr>
                                          <td>Evr</td>
                                          <td>Evr String</td>
                                          <td>Exists</td>
                                          <td>1:8.2p1-4ubuntu0.11</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: SSHD_CONFIG(5)

            CIS Controls V7.0:

            • Control 4: Controlled Use of Administrative Privileges: -- More
              CIS Control Information
              Control: The processes and tools used to track/control/prevent/correct the use, assignment, and configuration of administrative privileges on computers, networks, and applications.
              Subcontrol: 4.4
              Label: Use Unique Passwords
              Description: Where multi-factor authentication is not supported (such as local administrator, root, or service accounts), accounts will use passwords that are unique to that system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 5: Account Management: -- More
              CIS Control Information
              Control: Use processes and tools to assign and manage authorization to credentials for user accounts, including administrator accounts, as well as service accounts, to enterprise assets and software.
              Safeguard: 5.2
              Label: Use Unique Passwords
              Description: Use unique passwords for all enterprise assets. Best practice implementation includes, at a minimum, an 8-character password for accounts using MFA and a 14-character password for accounts not using MFA.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Pass

            4.2.13 Ensure only strong Ciphers are used

            Description:

            This variable limits the ciphers that SSH can use during communication.

            Note:

            • Some organizations may have stricter requirements for approved ciphers.
            • Ensure that ciphers used are in compliance with site policy.
            • The only "strong" ciphers currently FIPS 140-2 compliant are:
              • aes256-ctr
              • aes192-ctr
              • aes128-ctr

            Weak ciphers that are used for authentication to the cryptographic module cannot be relied upon to provide confidentiality or integrity, and system data may be compromised.

            • The Triple DES ciphers, as used in SSH, have a birthday bound of approximately four billion blocks, which makes it easier for remote attackers to obtain clear text data via a birthday attack against a long-duration encrypted session, aka a "Sweet32" attack.
            • Error handling in the SSH protocol; Client and Server, when using a block cipher algorithm in Cipher Block Chaining (CBC) mode, makes it easier for remote attackers to recover certain plain text data from an arbitrary block of cipher text in an SSH session via unknown vectors.

            Edit the /etc/ssh/sshd_config file add/modify the Ciphers line to contain a comma separated list of the site approved ciphers above any Include entries:

            Example:

            Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr

            Note: First occurrence of a option takes precedence. If Include locations are enabled, used, and order of precedence is understood in your environment, the entry may be created in a file in Include location.

            Show Assessment Evidence
            Complex Check
            OR
            Script: sce/sshd_running_config_nm.sh
            Result: Pass
            Exit Value: 101
            Output:
            • - Audit Result:
            • ** PASS **
            • - No incorrect values found
            No error lines were collected.
            Criterion: Ensure package name equals 'openssh-server' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Fail
            Dpkginfo Item
            Name Type Status Value
            Name String Exists openssh-server
            Arch String Exists amd64
            Epoch String Exists 1
            Release String Exists 4ubuntu0.11
            Version String Exists 8.2p1
            Evr Evr String Exists 1:8.2p1-4ubuntu0.11


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.2.13_Ensure_only_strong_Ciphers_are_used"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.892-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/10"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">https://nvd.nist.gov/vuln/detail/CVE-2016-2183</xccdf:ident>
               <xccdf:ident system="URL">https://www.openssh.com/txt/cbc.adv</xccdf:ident>
               <xccdf:ident system="URL">https://nvd.nist.gov/vuln/detail/CVE-2008-5161</xccdf:ident>
               <xccdf:ident system="URL">https://www.openssh.com/txt/cbc.adv</xccdf:ident>
               <xccdf:ident system="URL">SSHD_CONFIG(5)</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                         value-id="xccdf_org.cisecurity.benchmarks_value_3995275_var"/>
                     <xccdf:check-content-ref href="sce/sshd_running_config_nm.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/sshd_running_config_nm.sh"
                                        xccdf="pass"
                                        script="/root/Assessor/sce/sshd_running_config_nm.sh"
                                        exit-value="101">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** PASS **</l>
                              <l> - No incorrect values found</l>
                              <l/>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/sshd_running_config_nm.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="pass">Pass</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>101</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** PASS **</li>
                                          <li> - No incorrect values found</li>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995278"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995278">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995278"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'openssh-server' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Dpkginfo Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Name</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>openssh-server</td>
                                       </tr>
                                       <tr>
                                          <td>Arch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>amd64</td>
                                       </tr>
                                       <tr>
                                          <td>Epoch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>1</td>
                                       </tr>
                                       <tr>
                                          <td>Release</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>4ubuntu0.11</td>
                                       </tr>
                                       <tr>
                                          <td>Version</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>8.2p1</td>
                                       </tr>
                                       <tr>
                                          <td>Evr</td>
                                          <td>Evr String</td>
                                          <td>Exists</td>
                                          <td>1:8.2p1-4ubuntu0.11</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: https://nvd.nist.gov/vuln/detail/CVE-2016-2183
            • URL: https://www.openssh.com/txt/cbc.adv
            • URL: https://nvd.nist.gov/vuln/detail/CVE-2008-5161
            • URL: https://www.openssh.com/txt/cbc.adv
            • URL: SSHD_CONFIG(5)

            CIS Controls V7.0:

            • Control 14: Controlled Access Based on the Need to Know: -- More
              CIS Control Information
              Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
              Subcontrol: 14.4
              Label: Encrypt All Sensitive Information in Transit
              Description: Encrypt all sensitive information in transit.
            • >

            CIS Critical Security Controls V8.0:

            • Control 3: Data Protection: -- More
              CIS Control Information
              Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
              Safeguard: 3.10
              Label: Encrypt Sensitive Data in Transit
              Description: Encrypt sensitive data in transit. Example implementations can include: Transport Layer Security (TLS) and Open Secure Shell (OpenSSH).
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Fail

            4.2.14 Ensure only strong MAC algorithms are used

            Description:

            This variable limits the types of MAC algorithms that SSH can use during communication.

            Notes:

            • Some organizations may have stricter requirements for approved MACs.
            • Ensure that MACs used are in compliance with site policy.
            • The only "strong" MACs currently FIPS 140-2 approved are:
              • hmac-sha2-256
              • hmac-sha2-512

            MD5 and 96-bit MAC algorithms are considered weak and have been shown to increase exploitability in SSH downgrade attacks. Weak algorithms continue to have a great deal of attention as a weak spot that can be exploited with expanded computing power. An attacker that breaks the algorithm could take advantage of a MiTM position to decrypt the SSH tunnel and capture credentials and information.

            Edit the /etc/ssh/sshd_config file and add/modify the MACs line to contain a comma separated list of the site approved MACs above any Include entries:

            Example:

            MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128-etm@openssh.com,umac-128@openssh.com

            Note: First occurrence of a option takes precedence. If Include locations are enabled, used, and order of precedence is understood in your environment, the entry may be created in a file in Include location.

            Show Assessment Evidence
            Complex Check
            OR
            Script: sce/sshd_running_config_nm.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - "macs umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1" contains incorrect values
            No error lines were collected.
            Criterion: Ensure package name equals 'openssh-server' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Fail
            Dpkginfo Item
            Name Type Status Value
            Name String Exists openssh-server
            Arch String Exists amd64
            Epoch String Exists 1
            Release String Exists 4ubuntu0.11
            Version String Exists 8.2p1
            Evr Evr String Exists 1:8.2p1-4ubuntu0.11


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.2.14_Ensure_only_strong_MAC_algorithms_are_used"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.892-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/16/subcontrol/5"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/10"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">More information on SSH downgrade attacks can be found here: http://www.mitls.org/pages/attacks/SLOTH</xccdf:ident>
               <xccdf:ident system="URL">SSHD_CONFIG(5)</xccdf:ident>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                         value-id="xccdf_org.cisecurity.benchmarks_value_3995280_var"/>
                     <xccdf:check-content-ref href="sce/sshd_running_config_nm.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/sshd_running_config_nm.sh"
                                        xccdf="fail"
                                        script="/root/Assessor/sce/sshd_running_config_nm.sh"
                                        exit-value="102">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** FAIL **</l>
                              <l> - Reason(s) for audit failure:</l>
                              <l/>
                              <l> - "macs umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1" contains incorrect values</l>
                              <l/>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/sshd_running_config_nm.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="fail">Fail</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>102</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** FAIL **</li>
                                          <li> - Reason(s) for audit failure:</li>
                                          <li/>
                                          <li> - "macs umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1" contains incorrect values</li>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995281"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995281">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995281"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'openssh-server' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Dpkginfo Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Name</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>openssh-server</td>
                                       </tr>
                                       <tr>
                                          <td>Arch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>amd64</td>
                                       </tr>
                                       <tr>
                                          <td>Epoch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>1</td>
                                       </tr>
                                       <tr>
                                          <td>Release</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>4ubuntu0.11</td>
                                       </tr>
                                       <tr>
                                          <td>Version</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>8.2p1</td>
                                       </tr>
                                       <tr>
                                          <td>Evr</td>
                                          <td>Evr String</td>
                                          <td>Exists</td>
                                          <td>1:8.2p1-4ubuntu0.11</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: More information on SSH downgrade attacks can be found here: http://www.mitls.org/pages/attacks/SLOTH
            • URL: SSHD_CONFIG(5)
            • URL: NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5

            CIS Controls V7.0:

            • Control 14: Controlled Access Based on the Need to Know: -- More
              CIS Control Information
              Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
              Subcontrol: 14.4
              Label: Encrypt All Sensitive Information in Transit
              Description: Encrypt all sensitive information in transit.
            • Control 16: Account Monitoring and Control: -- More
              CIS Control Information
              Control: Actively manage the life cycle of system and application accounts - their creation, use, dormancy, deletion - in order to minimize opportunities for attackers to leverage them.
              Subcontrol: 16.5
              Label: Encrypt Transmittal of Username and Authentication Credentials
              Description: Ensure that all account usernames and authentication credentials are transmitted across networks using encrypted channels.
            • >

            CIS Critical Security Controls V8.0:

            • Control 3: Data Protection: -- More
              CIS Control Information
              Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
              Safeguard: 3.10
              Label: Encrypt Sensitive Data in Transit
              Description: Encrypt sensitive data in transit. Example implementations can include: Transport Layer Security (TLS) and Open Secure Shell (OpenSSH).
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Pass

            4.2.15 Ensure only strong Key Exchange algorithms are used

            Description:

            Key exchange is any method in cryptography by which cryptographic keys are exchanged between two parties, allowing use of a cryptographic algorithm. If the sender and receiver wish to exchange encrypted messages, each must be equipped to encrypt messages to be sent and decrypt messages received

            Notes:

            • Kex algorithms have a higher preference the earlier they appear in the list
            • Some organizations may have stricter requirements for approved Key exchange algorithms
            • Ensure that Key exchange algorithms used are in compliance with site policy
            • The only Key Exchange Algorithms currently FIPS 140-2 approved are:
              • ecdh-sha2-nistp256
              • ecdh-sha2-nistp384
              • ecdh-sha2-nistp521
              • diffie-hellman-group-exchange-sha256
              • diffie-hellman-group16-sha512
              • diffie-hellman-group18-sha512
              • diffie-hellman-group14-sha256

            Key exchange methods that are considered weak should be removed. A key exchange method may be weak because too few bits are used, or the hashing algorithm is considered too weak. Using weak algorithms could expose connections to man-in-the-middle attacks

            Edit the /etc/ssh/sshd_config file add/modify the KexAlgorithms line to contain a comma separated list of the site approved key exchange algorithms above any Include entries:

            Example:

            KexAlgorithms curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256

            Note: First occurrence of a option takes precedence. If Include locations are enabled, used, and order of precedence is understood in your environment, the entry may be created in a file in Include location.

            Show Assessment Evidence
            Complex Check
            OR
            Script: sce/sshd_running_config_nm.sh
            Result: Pass
            Exit Value: 101
            Output:
            • - Audit Result:
            • ** PASS **
            • - No incorrect values found
            No error lines were collected.
            Criterion: Ensure package name equals 'openssh-server' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Fail
            Dpkginfo Item
            Name Type Status Value
            Name String Exists openssh-server
            Arch String Exists amd64
            Epoch String Exists 1
            Release String Exists 4ubuntu0.11
            Version String Exists 8.2p1
            Evr Evr String Exists 1:8.2p1-4ubuntu0.11


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.2.15_Ensure_only_strong_Key_Exchange_algorithms_are_used"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.893-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/10"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: SC-8</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                         value-id="xccdf_org.cisecurity.benchmarks_value_3995285_var"/>
                     <xccdf:check-content-ref href="sce/sshd_running_config_nm.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/sshd_running_config_nm.sh"
                                        xccdf="pass"
                                        script="/root/Assessor/sce/sshd_running_config_nm.sh"
                                        exit-value="101">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** PASS **</l>
                              <l> - No incorrect values found</l>
                              <l/>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/sshd_running_config_nm.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="pass">Pass</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>101</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** PASS **</li>
                                          <li> - No incorrect values found</li>
                                          <li/>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995286"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995286">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995286"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'openssh-server' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Dpkginfo Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Name</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>openssh-server</td>
                                       </tr>
                                       <tr>
                                          <td>Arch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>amd64</td>
                                       </tr>
                                       <tr>
                                          <td>Epoch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>1</td>
                                       </tr>
                                       <tr>
                                          <td>Release</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>4ubuntu0.11</td>
                                       </tr>
                                       <tr>
                                          <td>Version</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>8.2p1</td>
                                       </tr>
                                       <tr>
                                          <td>Evr</td>
                                          <td>Evr String</td>
                                          <td>Exists</td>
                                          <td>1:8.2p1-4ubuntu0.11</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: SC-8

            CIS Controls V7.0:

            • Control 14: Controlled Access Based on the Need to Know: -- More
              CIS Control Information
              Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
              Subcontrol: 14.4
              Label: Encrypt All Sensitive Information in Transit
              Description: Encrypt all sensitive information in transit.
            • >

            CIS Critical Security Controls V8.0:

            • Control 3: Data Protection: -- More
              CIS Control Information
              Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
              Safeguard: 3.10
              Label: Encrypt Sensitive Data in Transit
              Description: Encrypt sensitive data in transit. Example implementations can include: Transport Layer Security (TLS) and Open Secure Shell (OpenSSH).
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Pass

            4.2.17 Ensure SSH warning banner is configured

            Description:

            The Banner parameter specifies a file whose contents must be sent to the remote user before authentication is permitted. By default, no banner is displayed.

            Banners are used to warn connecting users of the particular site's policy regarding connection. Presenting a warning message prior to the normal user login may assist the prosecution of trespassers on the computer system.

            Edit the /etc/ssh/sshd_config file to set the parameter above any Include entries as follows:

            Banner /etc/issue.net

            Note: First occurrence of a option takes precedence, Match set statements withstanding. If Include locations are enabled, used, and order of precedence is understood in your environment, the entry may be created in a file in Include location.

            Show Assessment Evidence
            Complex Check
            OR
            Script: sce/sshd_running_config.sh
            Result: Pass
            Exit Value: 101
            Output:
            • - Audit Result:
            • ** PASS **
            • - sshd parameter: "banner none"
            No error lines were collected.
            Criterion: Ensure package name equals 'openssh-server' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Fail
            Dpkginfo Item
            Name Type Status Value
            Name String Exists openssh-server
            Arch String Exists amd64
            Epoch String Exists 1
            Release String Exists 4ubuntu0.11
            Version String Exists 8.2p1
            Evr Evr String Exists 1:8.2p1-4ubuntu0.11


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.2.17_Ensure_SSH_warning_banner_is_configured"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.893-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:check system="http://open-scap.org/page/SCE"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                         value-id="xccdf_org.cisecurity.benchmarks_value_3995299_var"/>
                     <xccdf:check-content-ref href="sce/sshd_running_config.sh"/>
                     <xccdf:check-content>
                        <command_result href="sce/sshd_running_config.sh"
                                        xccdf="pass"
                                        script="/root/Assessor/sce/sshd_running_config.sh"
                                        exit-value="101">
                           <out>
                              <l/>
                              <l>- Audit Result:</l>
                              <l>  ** PASS **</l>
                              <l> - sshd parameter: "banner none"</l>
                           </out>
                           <err/>
                           <env/>
                        </command_result>
                     </xccdf:check-content>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="sce">
                           <table class="evidence-sep" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Script:</td>
                                    <td>sce/sshd_running_config.sh</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Result:</td>
                                    <td class="pass">Pass</td>
                                 </tr>
                                 <tr>
                                    <td class="bold">Exit Value:</td>
                                    <td>101</td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td class="bold">Output:</td>
                                    <td>
                                       <ul class="unstyled">
                                          <li/>
                                          <li>- Audit Result:</li>
                                          <li>  ** PASS **</li>
                                          <li> - sshd parameter: "banner none"</li>
                                       </ul>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                           <table class="evidence" width="100%">
                              <tbody class="tbe">
                                 <tr>
                                    <td>No error lines were collected.</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995300"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995300">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995300"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'openssh-server' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Dpkginfo Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Name</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>openssh-server</td>
                                       </tr>
                                       <tr>
                                          <td>Arch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>amd64</td>
                                       </tr>
                                       <tr>
                                          <td>Epoch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>1</td>
                                       </tr>
                                       <tr>
                                          <td>Release</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>4ubuntu0.11</td>
                                       </tr>
                                       <tr>
                                          <td>Version</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>8.2p1</td>
                                       </tr>
                                       <tr>
                                          <td>Evr</td>
                                          <td>Evr String</td>
                                          <td>Exists</td>
                                          <td>1:8.2p1-4ubuntu0.11</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5

            Fail

            4.2.18 Ensure SSH MaxAuthTries is set to 4 or less

            Description:

            The MaxAuthTries parameter specifies the maximum number of authentication attempts permitted per connection. When the login failure count reaches half the number, error messages will be written to the syslog file detailing the login failure.

            Setting the MaxAuthTries parameter to a low number will minimize the risk of successful brute force attacks to the SSH server. While the recommended setting is 4, set the number based on site policy.

            Edit the /etc/ssh/sshd_config file to set the parameter above any Include entries as follows:

            MaxAuthTries 4

            Note: First occurrence of a option takes precedence, Match set statements withstanding. If Include locations are enabled, used, and order of precedence is understood in your environment, the entry may be created in a file in Include location.

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Script: sce/sshd_running_config.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - check sshd parameter: "maxauthtries 6"
            No error lines were collected.
            Criterion: Ensure no file named /etc/ssh/sshd_config exists and matches pattern ^(?i)\s*maxauthtries\s+([5-9]|[1-9][0-9]+)
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensure package name equals 'openssh-server' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Fail
            Dpkginfo Item
            Name Type Status Value
            Name String Exists openssh-server
            Arch String Exists amd64
            Epoch String Exists 1
            Release String Exists 4ubuntu0.11
            Version String Exists 8.2p1
            Evr Evr String Exists 1:8.2p1-4ubuntu0.11


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.2.18_Ensure_SSH_MaxAuthTries_is_set_to_4_or_less"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.893-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/16/subcontrol/13"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/8/subcontrol/5"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">SSHD_CONFIG(5)</xccdf:ident>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AU-3</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:check system="http://open-scap.org/page/SCE"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                            value-id="xccdf_org.cisecurity.benchmarks_value_3995304_var"/>
                        <xccdf:check-content-ref href="sce/sshd_running_config.sh"/>
                        <xccdf:check-content>
                           <command_result href="sce/sshd_running_config.sh"
                                           xccdf="fail"
                                           script="/root/Assessor/sce/sshd_running_config.sh"
                                           exit-value="102">
                              <out>
                                 <l/>
                                 <l>- Audit Result:</l>
                                 <l>  ** FAIL **</l>
                                 <l> - Reason(s) for audit failure:</l>
                                 <l> - check sshd parameter: "maxauthtries 6"</l>
                              </out>
                              <err/>
                              <env/>
                           </command_result>
                        </xccdf:check-content>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="sce">
                              <table class="evidence-sep" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Script:</td>
                                       <td>sce/sshd_running_config.sh</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Result:</td>
                                       <td class="fail">Fail</td>
                                    </tr>
                                    <tr>
                                       <td class="bold">Exit Value:</td>
                                       <td>102</td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td class="bold">Output:</td>
                                       <td>
                                          <ul class="unstyled">
                                             <li/>
                                             <li>- Audit Result:</li>
                                             <li>  ** FAIL **</li>
                                             <li> - Reason(s) for audit failure:</li>
                                             <li> - check sshd parameter: "maxauthtries 6"</li>
                                          </ul>
                                       </td>
                                    </tr>
                                 </tbody>
                              </table>
                              <table class="evidence" width="100%">
                                 <tbody class="tbe">
                                    <tr>
                                       <td>No error lines were collected.</td>
                                    </tr>
                                 </tbody>
                              </table>
                           </div>
                        </evidence>
                     </xccdf:check>
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995308"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995308">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995308"
                                      check="all"
                                      check_existence="none_exist">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure no file named /etc/ssh/sshd_config exists and matches pattern ^(?i)\s*maxauthtries\s+([5-9]|[1-9][0-9]+)</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>None Exist</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995305"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995305">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995305"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'openssh-server' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Dpkginfo Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Name</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>openssh-server</td>
                                       </tr>
                                       <tr>
                                          <td>Arch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>amd64</td>
                                       </tr>
                                       <tr>
                                          <td>Epoch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>1</td>
                                       </tr>
                                       <tr>
                                          <td>Release</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>4ubuntu0.11</td>
                                       </tr>
                                       <tr>
                                          <td>Version</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>8.2p1</td>
                                       </tr>
                                       <tr>
                                          <td>Evr</td>
                                          <td>Evr String</td>
                                          <td>Exists</td>
                                          <td>1:8.2p1-4ubuntu0.11</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: SSHD_CONFIG(5)
            • URL: NIST SP 800-53 Rev. 5: AU-3

            CIS Controls V7.0:

            • Control 16: Account Monitoring and Control: -- More
              CIS Control Information
              Control: Actively manage the life cycle of system and application accounts - their creation, use, dormancy, deletion - in order to minimize opportunities for attackers to leverage them.
              Subcontrol: 16.13
              Label: Alert on Account Login Behavior Deviation
              Description: Alert when users deviate from normal login behavior, such as time-of-day, workstation location and duration.
            • >

            CIS Critical Security Controls V8.0:

            • Control 8: Audit Log Management: -- More
              CIS Control Information
              Control: Collect, alert, review, and retain audit logs of events that could help detect, understand, or recover from an attack.
              Safeguard: 8.5
              Label: Collect Detailed Audit Logs
              Description: Configure detailed audit logging for enterprise assets containing sensitive data. Include event source, date, username, timestamp, source addresses, destination addresses, and other useful elements that could assist in a forensic investigation.
              Implementation Group: IG-2
              Security Function: Detect
            • >

            Fail

            4.2.19 Ensure SSH MaxStartups is configured

            Description:

            The MaxStartups parameter specifies the maximum number of concurrent unauthenticated connections to the SSH daemon.

            To protect a system from denial of service due to a large number of pending authentication connection attempts, use the rate limiting function of MaxStartups to protect availability of sshd logins and prevent overwhelming the daemon.

            Edit the /etc/ssh/sshd_config file to set the parameter above any Include entries as follows:

            MaxStartups 10:30:60

            Note: First occurrence of a option takes precedence. If Include locations are enabled, used, and order of precedence is understood in your environment, the entry may be created in a file in Include location.

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Complex Check
            AND
            Script: sce/sshd_running_config.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - check sshd parameter: "maxstartups 10:30:100"
            No error lines were collected.
            Criterion: Ensure no file named /etc/ssh/sshd_config exists and matches pattern (?i)^\h*maxstartups\h+\"?(((1[1-9]|[1-9][0-9][0-9]+):([0-9]+):([0-9]+))|(([0-9]+):(3[1-9]|[4-9][0-9]|[1-9][0-9][0-9]+):([0-9]+))|(([0-9]+):([0-9]+):(6[1-9]|[7-9][0-9]|[1-9][0-9][0-9]+)))
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensurefile(s) named ^.+\.conf$ in /etc/ssh/sshd_config.d/ exists and matches pattern (?i)^\h*maxstartups\h+\"?(((1[1-9]|[1-9][0-9][0-9]+):([0-9]+):([0-9]+))|(([0-9]+):(3[1-9]|[4-9][0-9]|[1-9][0-9][0-9]+):([0-9]+))|(([0-9]+):([0-9]+):(6[1-9]|[7-9][0-9]|[1-
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensure package name equals 'openssh-server' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Fail
            Dpkginfo Item
            Name Type Status Value
            Name String Exists openssh-server
            Arch String Exists amd64
            Epoch String Exists 1
            Release String Exists 4ubuntu0.11
            Version String Exists 8.2p1
            Evr Evr String Exists 1:8.2p1-4ubuntu0.11


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.2.19_Ensure_SSH_MaxStartups_is_configured"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.893-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/5/subcontrol/1"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/1"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">SSHD_CONFIG(5)</xccdf:ident>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:complex-check operator="AND" negate="false">
                        <xccdf:check system="http://open-scap.org/page/SCE"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                               value-id="xccdf_org.cisecurity.benchmarks_value_3995310_var"/>
                           <xccdf:check-content-ref href="sce/sshd_running_config.sh"/>
                           <xccdf:check-content>
                              <command_result href="sce/sshd_running_config.sh"
                                              xccdf="fail"
                                              script="/root/Assessor/sce/sshd_running_config.sh"
                                              exit-value="102">
                                 <out>
                                    <l/>
                                    <l>- Audit Result:</l>
                                    <l>  ** FAIL **</l>
                                    <l> - Reason(s) for audit failure:</l>
                                    <l> - check sshd parameter: "maxstartups 10:30:100"</l>
                                 </out>
                                 <err/>
                                 <env/>
                              </command_result>
                           </xccdf:check-content>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="sce">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Script:</td>
                                          <td>sce/sshd_running_config.sh</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Exit Value:</td>
                                          <td>102</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Output:</td>
                                          <td>
                                             <ul class="unstyled">
                                                <li/>
                                                <li>- Audit Result:</li>
                                                <li>  ** FAIL **</li>
                                                <li> - Reason(s) for audit failure:</li>
                                                <li> - check sshd parameter: "maxstartups 10:30:100"</li>
                                             </ul>
                                          </td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td>No error lines were collected.</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </evidence>
                        </xccdf:check>
                        <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-content-ref href="#OVAL-Results-1"
                                                    name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995315"/>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="definition"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995315">
                                 <div class="criteria">
                                    <div class="criterion"
                                         id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995315"
                                         check="all"
                                         check_existence="none_exist">
                                       <table class="evidence-sep" width="100%">
                                          <tbody class="tbe">
                                             <tr>
                                                <td class="bold">Criterion:</td>
                                                <td>Ensure no file named /etc/ssh/sshd_config exists and matches pattern (?i)^\h*maxstartups\h+\"?(((1[1-9]|[1-9][0-9][0-9]+):([0-9]+):([0-9]+))|(([0-9]+):(3[1-9]|[4-9][0-9]|[1-9][0-9][0-9]+):([0-9]+))|(([0-9]+):([0-9]+):(6[1-9]|[7-9][0-9]|[1-9][0-9][0-9]+)))</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Existence Check:</td>
                                                <td>None Exist</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Item Check:</td>
                                                <td>All</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Result:</td>
                                                <td class="pass">Pass</td>
                                             </tr>
                                          </tbody>
                                       </table>
                                       <table class="evidence" width="100%">
                                          <tr>
                                             <td>No matching system items were found.</td>
                                          </tr>
                                       </table>
                                    </div>
                                 </div>
                              </div>
                           </evidence>
                        </xccdf:check>
                     </xccdf:complex-check>
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995317"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995317">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995317"
                                      check="all"
                                      check_existence="none_exist">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensurefile(s) named ^.+\.conf$ in /etc/ssh/sshd_config.d/ exists and matches pattern (?i)^\h*maxstartups\h+\"?(((1[1-9]|[1-9][0-9][0-9]+):([0-9]+):([0-9]+))|(([0-9]+):(3[1-9]|[4-9][0-9]|[1-9][0-9][0-9]+):([0-9]+))|(([0-9]+):([0-9]+):(6[1-9]|[7-9][0-9]|[1-</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>None Exist</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995313"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995313">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995313"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'openssh-server' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Dpkginfo Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Name</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>openssh-server</td>
                                       </tr>
                                       <tr>
                                          <td>Arch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>amd64</td>
                                       </tr>
                                       <tr>
                                          <td>Epoch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>1</td>
                                       </tr>
                                       <tr>
                                          <td>Release</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>4ubuntu0.11</td>
                                       </tr>
                                       <tr>
                                          <td>Version</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>8.2p1</td>
                                       </tr>
                                       <tr>
                                          <td>Evr</td>
                                          <td>Evr String</td>
                                          <td>Exists</td>
                                          <td>1:8.2p1-4ubuntu0.11</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: SSHD_CONFIG(5)
            • URL: NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5

            CIS Controls V7.0:

            • Control 5: Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers: -- More
              CIS Control Information
              Control: Establish, implement, and actively manage (track, report on, correct) the security configuration of mobile devices, laptops, servers, and workstations using a rigorous configuration management and change control process in order to prevent attackers from exploiting vulnerable services and settings.
              Subcontrol: 5.1
              Label: Establish Secure Configurations
              Description: Maintain documented, standard security configuration standards for all authorized operating systems and software.
            • >

            CIS Critical Security Controls V8.0:

            • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
              CIS Control Information
              Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
              Safeguard: 4.1
              Label: Establish and Maintain a Secure Configuration Process
              Description: Establish and maintain a secure configuration process for enterprise assets (end-user devices, including portable and mobile, non-computing/IoT devices, and servers) and software (operating systems and applications). Review and update documentation annually, or when significant enterprise changes occur that could impact this Safeguard.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Fail

            4.2.20 Ensure SSH LoginGraceTime is set to one minute or less

            Description:

            The LoginGraceTime parameter specifies the time allowed for successful authentication to the SSH server. The longer the Grace period is the more open unauthenticated connections can exist. Like other session controls in this session the Grace Period should be limited to appropriate organizational limits to ensure the service is available for needed access.

            Setting the LoginGraceTime parameter to a low number will minimize the risk of successful brute force attacks to the SSH server. It will also limit the number of concurrent unauthenticated connections While the recommended setting is 60 seconds (1 Minute), set the number based on site policy.

            Edit the /etc/ssh/sshd_config file to set the parameter above any Include entries as follows:

            LoginGraceTime 60

            Note: First occurrence of a option takes precedence, Match set statements withstanding. If Include locations are enabled, used, and order of precedence is understood in your environment, the entry may be created in a file in Include location.

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Complex Check
            AND
            Script: sce/sshd_running_config.sh
            Result: Fail
            Exit Value: 102
            Output:
            • - Audit Result:
            • ** FAIL **
            • - Reason(s) for audit failure:
            • - check sshd parameter: "logingracetime 120"
            No error lines were collected.
            Criterion: Ensure no file named /etc/ssh/sshd_config exists and matches pattern (?i)^\h*LoginGraceTime\h+\"?(0|6[1-9]|[7-9][0-9]|[1-9][0-9][0-9]+|[^1]m)\b
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensurefile(s) named ^.+\.conf$ in /etc/ssh/sshd_config.d/ exists and matches pattern (?i)^\h*LoginGraceTime\h+"?(0|6[1-9]|[7-9][0-9]|[1-9][0-9][0-9]+|[^1]m)\b
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensure package name equals 'openssh-server' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Fail
            Dpkginfo Item
            Name Type Status Value
            Name String Exists openssh-server
            Arch String Exists amd64
            Epoch String Exists 1
            Release String Exists 4ubuntu0.11
            Version String Exists 8.2p1
            Evr Evr String Exists 1:8.2p1-4ubuntu0.11


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.2.20_Ensure_SSH_LoginGraceTime_is_set_to_one_minute_or_less"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.893-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident system="URL">SSHD_CONFIG(5)</xccdf:ident>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-6</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:complex-check operator="AND" negate="false">
                        <xccdf:check system="http://open-scap.org/page/SCE"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                               value-id="xccdf_org.cisecurity.benchmarks_value_3995321_var"/>
                           <xccdf:check-content-ref href="sce/sshd_running_config.sh"/>
                           <xccdf:check-content>
                              <command_result href="sce/sshd_running_config.sh"
                                              xccdf="fail"
                                              script="/root/Assessor/sce/sshd_running_config.sh"
                                              exit-value="102">
                                 <out>
                                    <l/>
                                    <l>- Audit Result:</l>
                                    <l>  ** FAIL **</l>
                                    <l> - Reason(s) for audit failure:</l>
                                    <l> - check sshd parameter: "logingracetime 120"</l>
                                 </out>
                                 <err/>
                                 <env/>
                              </command_result>
                           </xccdf:check-content>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="sce">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Script:</td>
                                          <td>sce/sshd_running_config.sh</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Exit Value:</td>
                                          <td>102</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Output:</td>
                                          <td>
                                             <ul class="unstyled">
                                                <li/>
                                                <li>- Audit Result:</li>
                                                <li>  ** FAIL **</li>
                                                <li> - Reason(s) for audit failure:</li>
                                                <li> - check sshd parameter: "logingracetime 120"</li>
                                             </ul>
                                          </td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td>No error lines were collected.</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </evidence>
                        </xccdf:check>
                        <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-content-ref href="#OVAL-Results-1"
                                                    name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995325"/>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="definition"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995325">
                                 <div class="criteria">
                                    <div class="criterion"
                                         id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995325"
                                         check="all"
                                         check_existence="none_exist">
                                       <table class="evidence-sep" width="100%">
                                          <tbody class="tbe">
                                             <tr>
                                                <td class="bold">Criterion:</td>
                                                <td>Ensure no file named /etc/ssh/sshd_config exists and matches pattern (?i)^\h*LoginGraceTime\h+\"?(0|6[1-9]|[7-9][0-9]|[1-9][0-9][0-9]+|[^1]m)\b</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Existence Check:</td>
                                                <td>None Exist</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Item Check:</td>
                                                <td>All</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Result:</td>
                                                <td class="pass">Pass</td>
                                             </tr>
                                          </tbody>
                                       </table>
                                       <table class="evidence" width="100%">
                                          <tr>
                                             <td>No matching system items were found.</td>
                                          </tr>
                                       </table>
                                    </div>
                                 </div>
                              </div>
                           </evidence>
                        </xccdf:check>
                     </xccdf:complex-check>
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995327"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995327">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995327"
                                      check="all"
                                      check_existence="none_exist">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensurefile(s) named ^.+\.conf$ in /etc/ssh/sshd_config.d/ exists and matches pattern (?i)^\h*LoginGraceTime\h+"?(0|6[1-9]|[7-9][0-9]|[1-9][0-9][0-9]+|[^1]m)\b</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>None Exist</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995322"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995322">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995322"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'openssh-server' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Dpkginfo Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Name</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>openssh-server</td>
                                       </tr>
                                       <tr>
                                          <td>Arch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>amd64</td>
                                       </tr>
                                       <tr>
                                          <td>Epoch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>1</td>
                                       </tr>
                                       <tr>
                                          <td>Release</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>4ubuntu0.11</td>
                                       </tr>
                                       <tr>
                                          <td>Version</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>8.2p1</td>
                                       </tr>
                                       <tr>
                                          <td>Evr</td>
                                          <td>Evr String</td>
                                          <td>Exists</td>
                                          <td>1:8.2p1-4ubuntu0.11</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: SSHD_CONFIG(5)
            • URL: NIST SP 800-53 Rev. 5: CM-6

            Pass

            4.2.21 Ensure SSH MaxSessions is set to 10 or less

            Description:

            The MaxSessions parameter specifies the maximum number of open sessions permitted from a given connection.

            To protect a system from denial of service due to a large number of concurrent sessions, use the rate limiting function of MaxSessions to protect availability of sshd logins and prevent overwhelming the daemon.

            Edit the /etc/ssh/sshd_config file to set the parameter above any Include entries as follows:

            MaxSessions 10

            Note: First occurrence of a option takes precedence, Match set statements withstanding. If Include locations are enabled, used, and order of precedence is understood in your environment, the entry may be created in a file in Include location.

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Complex Check
            AND
            Script: sce/sshd_running_config.sh
            Result: Pass
            Exit Value: 101
            Output:
            • - Audit Result:
            • ** PASS **
            • - sshd parameter: "maxsessions 10"
            No error lines were collected.
            Criterion: Ensure no file named /etc/ssh/sshd_config exists and matches pattern (?i)^\h*MaxSessions\h+"?(1[1-9]|[2-9][0-9]|[1-9][0-9][0-9]+)\b
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensure no file(s) named ^.+\.conf$ in /etc/ssh/sshd_config.d/ exists and matches pattern (?i)^\h*MaxSessions\h+"?(1[1-9]|[2-9][0-9]|[1-9][0-9][0-9]+)\b
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensure package name equals 'openssh-server' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Fail
            Dpkginfo Item
            Name Type Status Value
            Name String Exists openssh-server
            Arch String Exists amd64
            Epoch String Exists 1
            Release String Exists 4ubuntu0.11
            Version String Exists 8.2p1
            Evr Evr String Exists 1:8.2p1-4ubuntu0.11


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.2.21_Ensure_SSH_MaxSessions_is_set_to_10_or_less"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.893-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident system="URL">SSHD_CONFIG(5)</xccdf:ident>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:complex-check operator="AND" negate="false">
                        <xccdf:check system="http://open-scap.org/page/SCE"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                               value-id="xccdf_org.cisecurity.benchmarks_value_3995330_var"/>
                           <xccdf:check-content-ref href="sce/sshd_running_config.sh"/>
                           <xccdf:check-content>
                              <command_result href="sce/sshd_running_config.sh"
                                              xccdf="pass"
                                              script="/root/Assessor/sce/sshd_running_config.sh"
                                              exit-value="101">
                                 <out>
                                    <l/>
                                    <l>- Audit Result:</l>
                                    <l>  ** PASS **</l>
                                    <l> - sshd parameter: "maxsessions 10"</l>
                                 </out>
                                 <err/>
                                 <env/>
                              </command_result>
                           </xccdf:check-content>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="sce">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Script:</td>
                                          <td>sce/sshd_running_config.sh</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Exit Value:</td>
                                          <td>101</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Output:</td>
                                          <td>
                                             <ul class="unstyled">
                                                <li/>
                                                <li>- Audit Result:</li>
                                                <li>  ** PASS **</li>
                                                <li> - sshd parameter: "maxsessions 10"</li>
                                             </ul>
                                          </td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td>No error lines were collected.</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </evidence>
                        </xccdf:check>
                        <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-content-ref href="#OVAL-Results-1"
                                                    name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995335"/>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="definition"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995335">
                                 <div class="criteria">
                                    <div class="criterion"
                                         id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995335"
                                         check="all"
                                         check_existence="none_exist">
                                       <table class="evidence-sep" width="100%">
                                          <tbody class="tbe">
                                             <tr>
                                                <td class="bold">Criterion:</td>
                                                <td>Ensure no file named /etc/ssh/sshd_config exists and matches pattern (?i)^\h*MaxSessions\h+"?(1[1-9]|[2-9][0-9]|[1-9][0-9][0-9]+)\b</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Existence Check:</td>
                                                <td>None Exist</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Item Check:</td>
                                                <td>All</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Result:</td>
                                                <td class="pass">Pass</td>
                                             </tr>
                                          </tbody>
                                       </table>
                                       <table class="evidence" width="100%">
                                          <tr>
                                             <td>No matching system items were found.</td>
                                          </tr>
                                       </table>
                                    </div>
                                 </div>
                              </div>
                           </evidence>
                        </xccdf:check>
                     </xccdf:complex-check>
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995337"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995337">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995337"
                                      check="all"
                                      check_existence="none_exist">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure no file(s) named ^.+\.conf$ in /etc/ssh/sshd_config.d/ exists and matches pattern (?i)^\h*MaxSessions\h+"?(1[1-9]|[2-9][0-9]|[1-9][0-9][0-9]+)\b</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>None Exist</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995332"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995332">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995332"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'openssh-server' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Dpkginfo Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Name</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>openssh-server</td>
                                       </tr>
                                       <tr>
                                          <td>Arch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>amd64</td>
                                       </tr>
                                       <tr>
                                          <td>Epoch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>1</td>
                                       </tr>
                                       <tr>
                                          <td>Release</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>4ubuntu0.11</td>
                                       </tr>
                                       <tr>
                                          <td>Version</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>8.2p1</td>
                                       </tr>
                                       <tr>
                                          <td>Evr</td>
                                          <td>Evr String</td>
                                          <td>Exists</td>
                                          <td>1:8.2p1-4ubuntu0.11</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: SSHD_CONFIG(5)
            • URL: NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5

            Pass

            4.2.22 Ensure SSH Idle Timeout Interval is configured

            Description:

            Note: To clarify, the two settings described below are only meant for idle connections from a protocol perspective and are not meant to check if the user is active or not. An idle user does not mean an idle connection. SSH does not and never had, intentionally, the capability to drop idle users. In SSH versions before 8.2p1 there was a bug that caused these values to behave in such a manner that they were abused to disconnect idle users. This bug has been resolved in 8.2p1 and thus it can no longer be abused disconnect idle users.

            The two options ClientAliveInterval and ClientAliveCountMax control the timeout of SSH sessions. Taken directly from man 5 sshd_config :

            • ClientAliveInterval Sets a timeout interval in seconds after which if no data has been received from the client, sshd(8) will send a message through the encrypted channel to request a response from the client. The default is 0, indicating that these messages will not be sent to the client.

            • ClientAliveCountMax Sets the number of client alive messages which may be sent without sshd(8) receiving any messages back from the client. If this threshold is reached while client alive messages are being sent, sshd will disconnect the client, terminating the session. It is important to note that the use of client alive messages is very different from TCPKeepAlive. The client alive messages are sent through the encrypted channel and therefore will not be spoofable. The TCP keepalive option en‐abled by TCPKeepAlive is spoofable. The client alive mechanism is valuable when the client or server depend on knowing when a connection has become unresponsive. The default value is 3. If ClientAliveInterval is set to 15, and ClientAliveCountMax is left at the default, unresponsive SSH clients will be disconnected after approximately 45 seconds. Setting a zero ClientAliveCountMax disables connection termination.

            In order to prevent resource exhaustion, appropriate values should be set for both ClientAliveInterval and ClientAliveCountMax . Specifically, looking at the source code, ClientAliveCountMax must be greater than zero in order to utilize the ability of SSH to drop idle connections. If connections are allowed to stay open indefinately, this can potentially be used as a DDOS attack or simple resource exhaustion could occur over unreliable networks.

            The example set here is a 45 second timeout. Consult your site policy for network timeouts and apply as appropriate.

            Edit the /etc/ssh/sshd_config file to set the parameters above any Include entries according to site policy.

            Example:

            ClientAliveInterval 15

            ClientAliveCountMax 3

            Note: First occurrence of a option takes precedence, Match set statements withstanding. If Include locations are enabled, used, and order of precedence is understood in your environment, the entry may be created in a file in Include location.

            Show Assessment Evidence
            Complex Check
            OR
            Complex Check
            AND
            Complex Check
            AND
            Script: sce/sshd_running_config.sh
            Result: Pass
            Exit Value: 101
            Output:
            • - Audit Result:
            • ** PASS **
            • - sshd parameter: "clientalivecountmax 3"
            No error lines were collected.
            Criterion: Ensure no file named /etc/ssh/sshd_config exists and matches pattern ^(?i)\h*ClientAliveCountMax\h+"?0\b
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensure no file(s) named ^.+\.conf$ in /etc/ssh/sshd_config.d/ exists and matches pattern (?i)^\h*ClientAliveCountMax\h+"?0\b
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensure package name equals 'openssh-server' is not installed
            Existence Check: None Exist
            Item Check: All
            Result: Fail
            Dpkginfo Item
            Name Type Status Value
            Name String Exists openssh-server
            Arch String Exists amd64
            Epoch String Exists 1
            Release String Exists 4ubuntu0.11
            Version String Exists 8.2p1
            Evr Evr String Exists 1:8.2p1-4ubuntu0.11


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.2.22_Ensure_SSH_Idle_Timeout_Interval_is_configured"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.894-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident system="URL">https://man.openbsd.org/sshd_config</xccdf:ident>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:complex-check operator="AND" negate="false">
                        <xccdf:check system="http://open-scap.org/page/SCE"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                               value-id="xccdf_org.cisecurity.benchmarks_value_3995340_var"/>
                           <xccdf:check-content-ref href="sce/sshd_running_config.sh"/>
                           <xccdf:check-content>
                              <command_result href="sce/sshd_running_config.sh"
                                              xccdf="pass"
                                              script="/root/Assessor/sce/sshd_running_config.sh"
                                              exit-value="101">
                                 <out>
                                    <l/>
                                    <l>- Audit Result:</l>
                                    <l>  ** PASS **</l>
                                    <l> - sshd parameter: "clientalivecountmax 3"</l>
                                 </out>
                                 <err/>
                                 <env/>
                              </command_result>
                           </xccdf:check-content>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="sce">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Script:</td>
                                          <td>sce/sshd_running_config.sh</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Exit Value:</td>
                                          <td>101</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Output:</td>
                                          <td>
                                             <ul class="unstyled">
                                                <li/>
                                                <li>- Audit Result:</li>
                                                <li>  ** PASS **</li>
                                                <li> - sshd parameter: "clientalivecountmax 3"</li>
                                             </ul>
                                          </td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td>No error lines were collected.</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </evidence>
                        </xccdf:check>
                        <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                     negate="false"
                                     multi-check="false">
                           <xccdf:check-content-ref href="#OVAL-Results-1"
                                                    name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995345"/>
                           <evidence xmlns="http://cisecurity.org/evidence">
                              <div class="definition"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995345">
                                 <div class="criteria">
                                    <div class="criterion"
                                         id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995345"
                                         check="all"
                                         check_existence="none_exist">
                                       <table class="evidence-sep" width="100%">
                                          <tbody class="tbe">
                                             <tr>
                                                <td class="bold">Criterion:</td>
                                                <td>Ensure no file named /etc/ssh/sshd_config exists and matches pattern ^(?i)\h*ClientAliveCountMax\h+"?0\b</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Existence Check:</td>
                                                <td>None Exist</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Item Check:</td>
                                                <td>All</td>
                                             </tr>
                                             <tr>
                                                <td class="bold">Result:</td>
                                                <td class="pass">Pass</td>
                                             </tr>
                                          </tbody>
                                       </table>
                                       <table class="evidence" width="100%">
                                          <tr>
                                             <td>No matching system items were found.</td>
                                          </tr>
                                       </table>
                                    </div>
                                 </div>
                              </div>
                           </evidence>
                        </xccdf:check>
                     </xccdf:complex-check>
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995347"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995347">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995347"
                                      check="all"
                                      check_existence="none_exist">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure no file(s) named ^.+\.conf$ in /etc/ssh/sshd_config.d/ exists and matches pattern (?i)^\h*ClientAliveCountMax\h+"?0\b</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>None Exist</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="pass">Pass</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995342"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995342">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995342"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'openssh-server' is not installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Dpkginfo Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Name</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>openssh-server</td>
                                       </tr>
                                       <tr>
                                          <td>Arch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>amd64</td>
                                       </tr>
                                       <tr>
                                          <td>Epoch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>1</td>
                                       </tr>
                                       <tr>
                                          <td>Release</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>4ubuntu0.11</td>
                                       </tr>
                                       <tr>
                                          <td>Version</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>8.2p1</td>
                                       </tr>
                                       <tr>
                                          <td>Evr</td>
                                          <td>Evr String</td>
                                          <td>Exists</td>
                                          <td>1:8.2p1-4ubuntu0.11</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: https://man.openbsd.org/sshd_config
            • URL: NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5

            4.3 Configure privilege escalation

            There are various tools which allows a permitted user to execute a command as the superuser or another user, as specified by the security policy.

            sudo

            sudo documentation

            The invoking user's real (not effective) user ID is used to determine the user name with which to query the security policy.

            sudo supports a plug-in architecture for security policies and input/output logging. Third parties can develop and distribute their own policy and I/O logging plug-ins to work seamlessly with the sudo front end. The default security policy is sudoers , which is configured via the file /etc/sudoers and any entries in /etc/sudoers.d .

            pkexec

            pkexec documentation

            pkexec allows an authorized user to execute PROGRAM as another user. If username is not specified, then the program will be executed as the administrative super user, root .

            Pass

            4.3.1 Ensure sudo is installed

            Description:

            sudo allows a permitted user to execute a command as the superuser or another user, as specified by the security policy. The invoking user's real (not effective) user ID is used to determine the user name with which to query the security policy.

            sudo supports a plug-in architecture for security policies and input/output logging. Third parties can develop and distribute their own policy and I/O logging plug-ins to work seamlessly with the sudo front end. The default security policy is sudoers , which is configured via the file /etc/sudoers and any entries in /etc/sudoers.d .

            The security policy determines what privileges, if any, a user has to run sudo . The policy may require that users authenticate themselves with a password or another authentication mechanism. If authentication is required, sudo will exit if the user's password is not entered within a configurable time limit. This limit is policy-specific.

            First determine is LDAP functionality is required. If so, then install sudo-ldap , else install sudo .

            Example:

            # apt install sudo

            Show Assessment Evidence
            Complex Check
            OR
            Criterion: Ensure package name equals 'sudo' is installed
            Existence Check: At Least One Exists
            Item Check: All
            Result: Pass
            Dpkginfo Item
            Name Type Status Value
            Name String Exists sudo
            Arch String Exists amd64
            Epoch String Exists (none)
            Release String Exists 1ubuntu1.5
            Version String Exists 1.8.31
            Evr Evr String Exists 0:1.8.31-1ubuntu1.5
            Criterion: Ensure package name equals 'sudo-ldap' is installed
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.3.1_Ensure_sudo_is_installed"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.894-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/4/subcontrol/3"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/5/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">SUDO(8)</xccdf:ident>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-2, AC-6</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995351"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995351">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995351"
                                   check="all"
                                   check_existence="at_least_one_exists">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'sudo' is installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>At Least One Exists</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Dpkginfo Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Name</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>sudo</td>
                                       </tr>
                                       <tr>
                                          <td>Arch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>amd64</td>
                                       </tr>
                                       <tr>
                                          <td>Epoch</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>(none)</td>
                                       </tr>
                                       <tr>
                                          <td>Release</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>1ubuntu1.5</td>
                                       </tr>
                                       <tr>
                                          <td>Version</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>1.8.31</td>
                                       </tr>
                                       <tr>
                                          <td>Evr</td>
                                          <td>Evr String</td>
                                          <td>Exists</td>
                                          <td>0:1.8.31-1ubuntu1.5</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995353"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995353">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995353"
                                   check="all"
                                   check_existence="at_least_one_exists">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure package name equals 'sudo-ldap' is installed</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>At Least One Exists</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: SUDO(8)
            • URL: NIST SP 800-53 Rev. 5: AC-2, AC-6

            CIS Controls V7.0:

            • Control 4: Controlled Use of Administrative Privileges: -- More
              CIS Control Information
              Control: The processes and tools used to track/control/prevent/correct the use, assignment, and configuration of administrative privileges on computers, networks, and applications.
              Subcontrol: 4.3
              Label: Ensure the Use of Dedicated Administrative Accounts
              Description: Ensure that all users with administrative account access use a dedicated or secondary account for elevated activities. This account should only be used for administrative activities and not internet browsing, email, or similar activities.
            • >

            CIS Critical Security Controls V8.0:

            • Control 5: Account Management: -- More
              CIS Control Information
              Control: Use processes and tools to assign and manage authorization to credentials for user accounts, including administrator accounts, as well as service accounts, to enterprise assets and software.
              Safeguard: 5.4
              Label: Restrict Administrator Privileges to Dedicated Administrator Accounts
              Description: Restrict administrator privileges to dedicated administrator accounts on enterprise assets. Conduct general computing activities, such as internet browsing, email, and productivity suite use, from the user's primary, non-privileged account.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Fail

            4.3.2 Ensure sudo commands use pty

            Description:

            sudo can be configured to run only from a pseudo terminal ( pseudo-pty ).

            Attackers can run a malicious program using sudo which would fork a background process that remains even when the main program has finished executing.

            Edit the file /etc/sudoers with visudo or a file in /etc/sudoers.d/ with visudo -f <PATH TO FILE> and add the following line:

            Defaults use_pty

            Note:

            • sudo will read each file in /etc/sudoers.d , skipping file names that end in ~ or contain a . character to avoid causing problems with package manager or editor temporary/backup files.
            • Files are parsed in sorted lexical order. That is, /etc/sudoers.d/01_first will be parsed before /etc/sudoers.d/10_second .
            • Be aware that because the sorting is lexical, not numeric, /etc/sudoers.d/1_whoops would be loaded after /etc/sudoers.d/10_second .
            • Using a consistent number of leading zeroes in the file names can be used to avoid such problems.

            Impact:

            WARNING: Editing the sudo configuration incorrectly can cause sudo to stop functioning. Always use visudo to modify sudo configuration files.

            Show Assessment Evidence
            Complex Check
            OR
            Criterion: Ensure at least one file named /etc/sudoers exists and matches pattern ^(?i)\h*Defaults\h+([^#\n\r]+,)?use_pty(,\h*\h+\h*)*\h*(#.*)?$
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            No matching system items were found.
            Criterion: Ensure at least one file(s) named ^.+$ in /etc/sudoers.d/ exists and matches pattern ^(?i)\h*Defaults\h+([^#\n\r]+,)?use_pty(,\h*\h+\h*)*\h*(#.*)?$
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.3.2_Ensure_sudo_commands_use_pty"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.894-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/5/subcontrol/1"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/5/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">SUDO(8)</xccdf:ident>
               <xccdf:ident system="URL">VISUDO(8)</xccdf:ident>
               <xccdf:ident system="URL">sudoers(5)</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995356"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995356">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995356"
                                   check="all"
                                   check_existence="at_least_one_exists">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure at least one file named /etc/sudoers exists and matches pattern ^(?i)\h*Defaults\h+([^#\n\r]+,)?use_pty(,\h*\h+\h*)*\h*(#.*)?$</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>At Least One Exists</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995358"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995358">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995358"
                                   check="all"
                                   check_existence="at_least_one_exists">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure at least one file(s) named ^.+$ in /etc/sudoers.d/ exists and matches pattern ^(?i)\h*Defaults\h+([^#\n\r]+,)?use_pty(,\h*\h+\h*)*\h*(#.*)?$</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>At Least One Exists</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: SUDO(8)
            • URL: VISUDO(8)
            • URL: sudoers(5)

            CIS Controls V7.0:

            • Control 5: Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers: -- More
              CIS Control Information
              Control: Establish, implement, and actively manage (track, report on, correct) the security configuration of mobile devices, laptops, servers, and workstations using a rigorous configuration management and change control process in order to prevent attackers from exploiting vulnerable services and settings.
              Subcontrol: 5.1
              Label: Establish Secure Configurations
              Description: Maintain documented, standard security configuration standards for all authorized operating systems and software.
            • >

            CIS Critical Security Controls V8.0:

            • Control 5: Account Management: -- More
              CIS Control Information
              Control: Use processes and tools to assign and manage authorization to credentials for user accounts, including administrator accounts, as well as service accounts, to enterprise assets and software.
              Safeguard: 5.4
              Label: Restrict Administrator Privileges to Dedicated Administrator Accounts
              Description: Restrict administrator privileges to dedicated administrator accounts on enterprise assets. Conduct general computing activities, such as internet browsing, email, and productivity suite use, from the user's primary, non-privileged account.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Fail

            4.3.3 Ensure sudo log file exists

            Description:

            sudo can use a custom log file

            A sudo log file simplifies auditing of sudo commands

            Edit the file /etc/sudoers or a file in /etc/sudoers.d/ with visudo or visudo -f <PATH TO FILE> and add the following line:

            Example:

            Defaults logfile="/var/log/sudo.log"

            Note:

            • sudo will read each file in /etc/sudoers.d , skipping file names that end in ~ or contain a . character to avoid causing problems with package manager or editor temporary/backup files.
            • Files are parsed in sorted lexical order. That is, /etc/sudoers.d/01_first will be parsed before /etc/sudoers.d/10_second .
            • Be aware that because the sorting is lexical, not numeric, /etc/sudoers.d/1_whoops would be loaded after /etc/sudoers.d/10_second .
            • Using a consistent number of leading zeroes in the file names can be used to avoid such problems.

            Impact:

            WARNING: Editing the sudo configuration incorrectly can cause sudo to stop functioning. Always use visudo to modify sudo configuration files.

            Show Assessment Evidence
            Complex Check
            OR
            Criterion: Ensure at least one file named /etc/sudoers exists and matches pattern ^(?i)\h*Defaults\h+([^#]+,\h*)?logfile\h*=\h*(\"|\')?\H+(\"|\')?(,\h*\H+\h*)*\h*(#.*)?$
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            No matching system items were found.
            Criterion: Ensure at least one file(s) named ^.+$ in /etc/sudoers.d exists and matches pattern ^(?i)\h*Defaults\h+([^#]+,\h*)?logfile\h*=\h*(\"|\')?\H+(\"|\')?(,\h*\H+\h*)*\h*(#.*)?$
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.3.3_Ensure_sudo_log_file_exists"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.894-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/3"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/8/subcontrol/5"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">SUDO(8)</xccdf:ident>
               <xccdf:ident system="URL">VISUDO(8)</xccdf:ident>
               <xccdf:ident system="URL">sudoers(5)</xccdf:ident>
               <xccdf:complex-check operator="OR" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995362"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995362">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995362"
                                   check="all"
                                   check_existence="at_least_one_exists">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure at least one file named /etc/sudoers exists and matches pattern ^(?i)\h*Defaults\h+([^#]+,\h*)?logfile\h*=\h*(\"|\')?\H+(\"|\')?(,\h*\H+\h*)*\h*(#.*)?$</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>At Least One Exists</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995363"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995363">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995363"
                                   check="all"
                                   check_existence="at_least_one_exists">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure at least one file(s) named ^.+$ in /etc/sudoers.d exists and matches pattern ^(?i)\h*Defaults\h+([^#]+,\h*)?logfile\h*=\h*(\"|\')?\H+(\"|\')?(,\h*\H+\h*)*\h*(#.*)?$</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>At Least One Exists</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: SUDO(8)
            • URL: VISUDO(8)
            • URL: sudoers(5)

            CIS Controls V7.0:

            • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
              CIS Control Information
              Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
              Subcontrol: 6.3
              Label: Enable Detailed Logging
              Description: Enable system logging to include detailed information such as a event source, date, user, timestamp, source addresses, destination addresses, and other useful elements.
            • >

            CIS Critical Security Controls V8.0:

            • Control 8: Audit Log Management: -- More
              CIS Control Information
              Control: Collect, alert, review, and retain audit logs of events that could help detect, understand, or recover from an attack.
              Safeguard: 8.5
              Label: Collect Detailed Audit Logs
              Description: Configure detailed audit logging for enterprise assets containing sensitive data. Include event source, date, username, timestamp, source addresses, destination addresses, and other useful elements that could assist in a forensic investigation.
              Implementation Group: IG-2
              Security Function: Detect
            • >

            Pass

            4.3.5 Ensure re-authentication for privilege escalation is not disabled globally

            Description:

            The operating system must be configured so that users must re-authenticate for privilege escalation.

            Without re-authentication, users may access resources or perform tasks for which they do not have authorization.

            When operating systems provide the capability to escalate a functional capability, it is critical the user re-authenticate.

            Configure the operating system to require users to reauthenticate for privilege escalation.

            Based on the outcome of the audit procedure, use visudo -f <PATH TO FILE> to edit the relevant sudoers file.

            Remove any occurrences of !authenticate tags in the file(s).

            Show Assessment Evidence
            Complex Check
            AND
            Criterion: Ensure no file named /etc/sudoers exists and matches pattern (?i)^\h*([^#\n\r]+\h+)?\!authenticate\b(\.*)?$
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensurefile(s) named ^.+$ in /etc/sudoers.d/ exists and matches pattern (?i)^\h*([^#\n\r]+\h+)?\!authenticate\b(\.*)?$
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.3.5_Ensure_re-authentication_for_privilege_escalation_is_not_disabled_globally"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.894-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/4/subcontrol/3"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/5/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-6</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995372"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995372">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995372"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure no file named /etc/sudoers exists and matches pattern (?i)^\h*([^#\n\r]+\h+)?\!authenticate\b(\.*)?$</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995374"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995374">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995374"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensurefile(s) named ^.+$ in /etc/sudoers.d/ exists and matches pattern (?i)^\h*([^#\n\r]+\h+)?\!authenticate\b(\.*)?$</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: AC-6

            CIS Controls V7.0:

            • Control 4: Controlled Use of Administrative Privileges: -- More
              CIS Control Information
              Control: The processes and tools used to track/control/prevent/correct the use, assignment, and configuration of administrative privileges on computers, networks, and applications.
              Subcontrol: 4.3
              Label: Ensure the Use of Dedicated Administrative Accounts
              Description: Ensure that all users with administrative account access use a dedicated or secondary account for elevated activities. This account should only be used for administrative activities and not internet browsing, email, or similar activities.
            • >

            CIS Critical Security Controls V8.0:

            • Control 5: Account Management: -- More
              CIS Control Information
              Control: Use processes and tools to assign and manage authorization to credentials for user accounts, including administrator accounts, as well as service accounts, to enterprise assets and software.
              Safeguard: 5.4
              Label: Restrict Administrator Privileges to Dedicated Administrator Accounts
              Description: Restrict administrator privileges to dedicated administrator accounts on enterprise assets. Conduct general computing activities, such as internet browsing, email, and productivity suite use, from the user's primary, non-privileged account.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Pass

            4.3.6 Ensure sudo authentication timeout is configured correctly

            Description:

            sudo caches used credentials for a default of 15 minutes. This is for ease of use when there are multiple administrative tasks to perform. The timeout can be modified to suit local security policies.

            This default is distribution specific. See audit section for further information.

            Setting a timeout value reduces the window of opportunity for unauthorized privileged access to another user.

            If the currently configured timeout is larger than 15 minutes, edit the file listed in the audit section with visudo -f <PATH TO FILE> and modify the entry timestamp_timeout= to 15 minutes or less as per your site policy. The value is in minutes. This particular entry may appear on it's own, or on the same line as env_reset . See the following two examples:

            Defaults env_reset, timestamp_timeout=15 Defaults timestamp_timeout=15

            Defaults env_reset

            Show Assessment Evidence
            Complex Check
            AND
            Criterion: Ensure no file named /etc/sudoers exists and matches pattern (?i)^\h*defaults\h+(?:[^#\n\r]+\h*,\h*)?timestamp_timeout=(-1|1[6-9]|[2-9][0-9]|[1-9][0-9][0-9]+)\b(\h*,\h*.*)?$
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.
            Criterion: Ensure no file(s) named ^.+\.conf$ in /etc/sudoers.d/ exists and matches pattern (?i)^\h*defaults\h+(?:[^#\n\r]+\h*,\h*)?timestamp_timeout=(-1|1[6-9]|[2-9][0-9]|[1-9][0-9][0-9]+)\b(\h*,\h*.*)?$
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.3.6_Ensure_sudo_authentication_timeout_is_configured_correctly"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.894-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/4/subcontrol/3"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/5/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">https://www.sudo.ws/man/1.9.0/sudoers.man.html</xccdf:ident>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-6</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995378"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995378">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995378"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure no file named /etc/sudoers exists and matches pattern (?i)^\h*defaults\h+(?:[^#\n\r]+\h*,\h*)?timestamp_timeout=(-1|1[6-9]|[2-9][0-9]|[1-9][0-9][0-9]+)\b(\h*,\h*.*)?$</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995380"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995380">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995380"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure no file(s) named ^.+\.conf$ in /etc/sudoers.d/ exists and matches pattern (?i)^\h*defaults\h+(?:[^#\n\r]+\h*,\h*)?timestamp_timeout=(-1|1[6-9]|[2-9][0-9]|[1-9][0-9][0-9]+)\b(\h*,\h*.*)?$</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: https://www.sudo.ws/man/1.9.0/sudoers.man.html
            • URL: NIST SP 800-53 Rev. 5: AC-6

            CIS Controls V7.0:

            • Control 4: Controlled Use of Administrative Privileges: -- More
              CIS Control Information
              Control: The processes and tools used to track/control/prevent/correct the use, assignment, and configuration of administrative privileges on computers, networks, and applications.
              Subcontrol: 4.3
              Label: Ensure the Use of Dedicated Administrative Accounts
              Description: Ensure that all users with administrative account access use a dedicated or secondary account for elevated activities. This account should only be used for administrative activities and not internet browsing, email, or similar activities.
            • >

            CIS Critical Security Controls V8.0:

            • Control 5: Account Management: -- More
              CIS Control Information
              Control: Use processes and tools to assign and manage authorization to credentials for user accounts, including administrator accounts, as well as service accounts, to enterprise assets and software.
              Safeguard: 5.4
              Label: Restrict Administrator Privileges to Dedicated Administrator Accounts
              Description: Restrict administrator privileges to dedicated administrator accounts on enterprise assets. Conduct general computing activities, such as internet browsing, email, and productivity suite use, from the user's primary, non-privileged account.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Fail

            4.3.7 Ensure access to the su command is restricted

            Description:

            The su command allows a user to run a command or shell as another user. The program has been superseded by sudo , which allows for more granular control over privileged access. Normally, the su command can be executed by any user. By uncommenting the pam_wheel.so statement in /etc/pam.d/su , the su command will only allow users in a specific groups to execute su . This group should be empty to reinforce the use of sudo for privileged access.

            Restricting the use of su , and using sudo in its place, provides system administrators better control of the escalation of user privileges to execute privileged commands. The sudo utility also provides a better logging and audit mechanism, as it can log each command executed via sudo , whereas su can only record that a user executed the su program.

            Create an empty group that will be specified for use of the su command. The group should be named according to site policy.

            Example:

            # groupadd sugroup

            Add the following line to the /etc/pam.d/su file, specifying the empty group:

            auth required pam_wheel.so use_uid group=sugroup

            Show Assessment Evidence
            Complex Check
            AND
            Criterion: Ensure at least one file named /etc/pam.d/su exists and matches pattern (?i)^\h*auth\h+(?:required|requisite)\h+pam_wheel\.so\h+(?:[^#\n\r]+\h+)?((?!\2)(use_uid\b|group=\H+\b))\h+(?:[^#\n\r]+\h+)?((?!\1)(use_uid\b|group=\H+\b))(\h+.*)?$
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.3.7_Ensure_access_to_the_su_command_is_restricted"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.894-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3. MP-2</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995384"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995384">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995384"
                                   check="all"
                                   check_existence="at_least_one_exists">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure at least one file named /etc/pam.d/su exists and matches pattern (?i)^\h*auth\h+(?:required|requisite)\h+pam_wheel\.so\h+(?:[^#\n\r]+\h+)?((?!\2)(use_uid\b|group=\H+\b))\h+(?:[^#\n\r]+\h+)?((?!\1)(use_uid\b|group=\H+\b))(\h+.*)?$</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>At Least One Exists</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: AC-3. MP-2

            CIS Controls V7.0:

            • Control 14: Controlled Access Based on the Need to Know: -- More
              CIS Control Information
              Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
              Subcontrol: 14.6
              Label: Protect Information through Access Control Lists
              Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
            • >

            CIS Critical Security Controls V8.0:

            • Control 3: Data Protection: -- More
              CIS Control Information
              Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
              Safeguard: 3.3
              Label: Configure Data Access Control Lists
              Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            4.4 Configure PAM

            PAM (Pluggable Authentication Modules) is a service that implements modular authentication modules on UNIX systems. PAM is implemented as a set of shared objects that are loaded and executed when a program needs to authenticate a user. Files for PAM are typically located in the /etc/pam.d directory. PAM must be carefully configured to secure system authentication. While this section covers some of PAM, please consult other PAM resources to fully understand the configuration capabilities.

            Note: The usage of pam-auth-update :

            • As of this writing, the management of PAM via pam-auth-update does not offer all the required functionality implemented by the benchmark. As such, the usage of pam-auth-update is not recommended at present.
            Fail

            4.4.1 Ensure password creation requirements are configured

            Description:

            The pam_pwquality.so module checks the strength of passwords. It performs checks such as making sure a password is not a dictionary word, it is a certain length, contains a mix of characters (e.g. alphabet, numeric, other) and more.

            The following options are set in the /etc/security/pwquality.conf file:

            • Password Length:
              • minlen = 14 - password must be 14 characters or more
            • Password complexity:
              • minclass = 4 - The minimum number of required classes of characters for the new password (digits, uppercase, lowercase, others)

                OR

              • dcredit = -1 - provide at least one digit

              • ucredit = -1 - provide at least one uppercase character

              • ocredit = -1 - provide at least one special character

              • lcredit = -1 - provide at least one lowercase character

            Strong passwords protect systems from being hacked through brute force methods.

            The following setting is a recommend example policy. Alter these values to conform to your own organization's password policies.

            Run the following command to install the pam_pwquality module:

            # apt install libpam-pwquality

            Edit the file /etc/security/pwquality.conf and add or modify the following line for password length to conform to site policy:

            minlen = 14

            Edit the file /etc/security/pwquality.conf and add or modify the following line for password complexity to conform to site policy:

            Option 1

            minclass = 4

            Option 2

            dcredit = -1

            ucredit = -1

            ocredit = -1

            lcredit = -1

            Edit the /etc/pam.d/common-password file to include pam_pwquality.so and to conform to site policy:

            password requisite pam_pwquality.so retry=3

            Show Assessment Evidence
            Complex Check
            AND
            Criterion: Ensure at least one file named /etc/security/pwquality.conf exists and matches pattern ^\s*minlen\s*=\s*(1[4-9]|[2-9][0-9]|[1-9][0-9][0-9])(\s+#.*)*$
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            No matching system items were found.
            Criterion: Ensure at least one file named /etc/pam.d/common-password exists and matches pattern ^\h*password\h+[^#\n\r]+\h+pam_pwquality\.so\b
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.4.1_Ensure_password_creation_requirements_are_configured"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.894-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/5/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: IA-5</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995387"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995387">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995387"
                                   check="all"
                                   check_existence="at_least_one_exists">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure at least one file named /etc/security/pwquality.conf exists and matches pattern ^\s*minlen\s*=\s*(1[4-9]|[2-9][0-9]|[1-9][0-9][0-9])(\s+#.*)*$</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>At Least One Exists</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995389"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995389">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995389"
                                   check="all"
                                   check_existence="at_least_one_exists">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure at least one file named /etc/pam.d/common-password exists and matches pattern ^\h*password\h+[^#\n\r]+\h+pam_pwquality\.so\b</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>At Least One Exists</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: IA-5

            CIS Controls V7.0:

            • Control 4: Controlled Use of Administrative Privileges: -- More
              CIS Control Information
              Control: The processes and tools used to track/control/prevent/correct the use, assignment, and configuration of administrative privileges on computers, networks, and applications.
              Subcontrol: 4.4
              Label: Use Unique Passwords
              Description: Where multi-factor authentication is not supported (such as local administrator, root, or service accounts), accounts will use passwords that are unique to that system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 5: Account Management: -- More
              CIS Control Information
              Control: Use processes and tools to assign and manage authorization to credentials for user accounts, including administrator accounts, as well as service accounts, to enterprise assets and software.
              Safeguard: 5.2
              Label: Use Unique Passwords
              Description: Use unique passwords for all enterprise assets. Best practice implementation includes, at a minimum, an 8-character password for accounts using MFA and a 14-character password for accounts not using MFA.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Fail

            4.4.2 Ensure lockout for failed password attempts is configured

            Description:

            Lock out users after n unsuccessful consecutive login attempts. The first sets of changes are made to the PAM configuration files. The second set of changes are applied to the program specific PAM configuration file. The second set of changes must be applied to each program that will lock out users. Check the documentation for each secondary program for instructions on how to configure them to work with PAM.

            • deny= n - n represents the number of failed attempts before the account is locked
            • unlock_time= n - n represents the number of seconds before the account is unlocked
            • audit - Will log the user name into the system log if the user is not found.
            • silent - Don't print informative messages. Set the lockout number and unlock time in accordance with local site policy.

            Locking out user IDs after n unsuccessful consecutive login attempts mitigates brute force password attacks against your systems.

            Edit the /etc/pam.d/common-auth file and add the auth line below:

            auth required pam_tally2.so onerr=fail audit silent deny=5 unlock_time=900

            Edit the /etc/pam.d/common-account file and add the account lines bellow:

            account requisite pam_deny.so

            account required pam_tally2.so

            Show Assessment Evidence
            Complex Check
            AND
            Complex Check
            AND
            Criterion: Ensure at least one file named /etc/pam.d/common-auth exists and matches pattern (?i)\h*auth\h+([^#\n\r]+\h+)pam_tally2\.so\h+([^#\n\r]+\h+)?deny=[1-5]\b
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            No matching system items were found.
            Criterion: Ensure at least one file named /etc/pam.d/common-account exists and matches pattern (?i)^\h*account\h+([^#\n\r]+\h+)pam_tally2\.so\b
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            No matching system items were found.
            Criterion: Ensure at least one file named /etc/pam.d/common-account exists and matches pattern (?i)^\h*account\h+([^#\n\r]+\h+)pam_deny\.so\b
            Existence Check: At Least One Exists
            Item Check: All
            Result: Pass
            Textfilecontent Item
            Name Type Status Value
            Filepath String Exists /etc/pam.d/common-account
            Path String Exists /etc/pam.d
            Filename String Exists common-account
            Pattern String Exists (?i)^\h*account\h+([^#\n\r]+\h+)pam_deny\.so\b
            Instance Int Exists 1
            Line String Exists account requisite pam_deny.so
            Text String Exists account requisite pam_deny.so
            Subexpression String Exists requisite
            Windows View String Not collected No Value


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.4.2_Ensure_lockout_for_failed_password_attempts_is_configured"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.894-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/16/subcontrol/7"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-1, AC-2</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:complex-check operator="AND" negate="false">
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995392"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995392">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995392"
                                      check="all"
                                      check_existence="at_least_one_exists">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure at least one file named /etc/pam.d/common-auth exists and matches pattern (?i)\h*auth\h+([^#\n\r]+\h+)pam_tally2\.so\h+([^#\n\r]+\h+)?deny=[1-5]\b</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>At Least One Exists</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="fail">Fail</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                  negate="false"
                                  multi-check="false">
                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995393"/>
                        <evidence xmlns="http://cisecurity.org/evidence">
                           <div class="definition"
                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995393">
                              <div class="criteria">
                                 <div class="criterion"
                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995393"
                                      check="all"
                                      check_existence="at_least_one_exists">
                                    <table class="evidence-sep" width="100%">
                                       <tbody class="tbe">
                                          <tr>
                                             <td class="bold">Criterion:</td>
                                             <td>Ensure at least one file named /etc/pam.d/common-account exists and matches pattern (?i)^\h*account\h+([^#\n\r]+\h+)pam_tally2\.so\b</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Existence Check:</td>
                                             <td>At Least One Exists</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Item Check:</td>
                                             <td>All</td>
                                          </tr>
                                          <tr>
                                             <td class="bold">Result:</td>
                                             <td class="fail">Fail</td>
                                          </tr>
                                       </tbody>
                                    </table>
                                    <table class="evidence" width="100%">
                                       <tr>
                                          <td>No matching system items were found.</td>
                                       </tr>
                                    </table>
                                 </div>
                              </div>
                           </div>
                        </evidence>
                     </xccdf:check>
                  </xccdf:complex-check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995394"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995394">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995394"
                                   check="all"
                                   check_existence="at_least_one_exists">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure at least one file named /etc/pam.d/common-account exists and matches pattern (?i)^\h*account\h+([^#\n\r]+\h+)pam_deny\.so\b</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>At Least One Exists</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Textfilecontent Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Filepath</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>/etc/pam.d/common-account</td>
                                       </tr>
                                       <tr>
                                          <td>Path</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>/etc/pam.d</td>
                                       </tr>
                                       <tr>
                                          <td>Filename</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>common-account</td>
                                       </tr>
                                       <tr>
                                          <td>Pattern</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>(?i)^\h*account\h+([^#\n\r]+\h+)pam_deny\.so\b</td>
                                       </tr>
                                       <tr>
                                          <td>Instance</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>1</td>
                                       </tr>
                                       <tr>
                                          <td>Line</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>account	requisite			pam_deny.so</td>
                                       </tr>
                                       <tr>
                                          <td>Text</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>account	requisite			pam_deny.so</td>
                                       </tr>
                                       <tr>
                                          <td>Subexpression</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>requisite			</td>
                                       </tr>
                                       <tr>
                                          <td>Windows View</td>
                                          <td>String</td>
                                          <td>Not collected</td>
                                          <td>No Value</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: AC-1, AC-2

            CIS Controls V7.0:

            • Control 16: Account Monitoring and Control: -- More
              CIS Control Information
              Control: Actively manage the life cycle of system and application accounts - their creation, use, dormancy, deletion - in order to minimize opportunities for attackers to leverage them.
              Subcontrol: 16.7
              Label: Establish Process for Revoking Access
              Description: Establish and follow an automated process for revoking system access by disabling accounts immediately upon termination or change of responsibilities of an employee or contractor . Disabling these accounts, instead of deleting accounts, allows preservation of audit trails.
            • >

            Fail

            4.4.3 Ensure password reuse is limited

            Description:

            The /etc/security/opasswd file stores the users' old passwords and can be checked to ensure that users are not recycling recent passwords.

            Forcing users not to reuse their past 5 passwords make it less likely that an attacker will be able to guess the password.

            NOTE: Pay special attention to the configuration. Incorrect configuration can cause system lock outs or unexpected behavior. This is example configuration. You configuration may differ based on previous changes to the files.

            Edit the /etc/pam.d/common-password file to include:

            • password required pam_pwhistory.so remember=5
            • use_authtok on the pam_unix.so line

            Example:

            password required pam_pwhistory.so remember=5

            password [success=1 default=ignore] pam_unix.so obscure sha512 use_authtok

            Show Assessment Evidence
            Complex Check
            AND
            Criterion: Ensure at least one file named /etc/pam.d/common-password exists and matches pattern ^\h*password\h+([^#\n\r]+\h+)?pam_pwhistory\.so\h+([^#\n\r]+\h+)?remember=([5-9]|[1-9][0-9]+)(\b|\h+|$)
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            No matching system items were found.
            Criterion: Ensure at least one file named /etc/pam.d/common-password exists and matches pattern ^\h*password\h+([^#\n\r]+\h+)?pam_unix\.so\h+([^#\n\r]+\h+)?use_authtok\b
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.4.3_Ensure_password_reuse_is_limited"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.894-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/5/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">https://manpages.ubuntu.com/manpages/focal/man8/pam_pwhistory.8.html</xccdf:ident>
               <xccdf:ident system="URL">https://bugs.launchpad.net/ubuntu/+source/pam/+bug/1989731</xccdf:ident>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-2, IA-5</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995395"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995395">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995395"
                                   check="all"
                                   check_existence="at_least_one_exists">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure at least one file named /etc/pam.d/common-password exists and matches pattern ^\h*password\h+([^#\n\r]+\h+)?pam_pwhistory\.so\h+([^#\n\r]+\h+)?remember=([5-9]|[1-9][0-9]+)(\b|\h+|$)</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>At Least One Exists</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995396"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995396">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995396"
                                   check="all"
                                   check_existence="at_least_one_exists">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure at least one file named /etc/pam.d/common-password exists and matches pattern ^\h*password\h+([^#\n\r]+\h+)?pam_unix\.so\h+([^#\n\r]+\h+)?use_authtok\b</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>At Least One Exists</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: https://manpages.ubuntu.com/manpages/focal/man8/pam_pwhistory.8.html
            • URL: https://bugs.launchpad.net/ubuntu/+source/pam/+bug/1989731
            • URL: NIST SP 800-53 Rev. 5: AC-2, IA-5

            CIS Controls V7.0:

            • Control 4: Controlled Use of Administrative Privileges: -- More
              CIS Control Information
              Control: The processes and tools used to track/control/prevent/correct the use, assignment, and configuration of administrative privileges on computers, networks, and applications.
              Subcontrol: 4.4
              Label: Use Unique Passwords
              Description: Where multi-factor authentication is not supported (such as local administrator, root, or service accounts), accounts will use passwords that are unique to that system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 5: Account Management: -- More
              CIS Control Information
              Control: Use processes and tools to assign and manage authorization to credentials for user accounts, including administrator accounts, as well as service accounts, to enterprise assets and software.
              Safeguard: 5.2
              Label: Use Unique Passwords
              Description: Use unique passwords for all enterprise assets. Best practice implementation includes, at a minimum, an 8-character password for accounts using MFA and a 14-character password for accounts not using MFA.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Pass

            4.4.4 Ensure strong password hashing algorithm is configured

            Description:

            Hash functions behave as one-way functions by using mathematical operations that are extremely difficult and cumbersome to revert

            When a user is created, the password is run through a one-way hashing algorithm before being stored. When the user logs in, the password sent is run through the same one-way hashing algorithm and compared to the hash connected with the provided username. If the hashed password and the stored hash match, the login is valid.

            The SHA512 hashing algorithm provides stronger hashing than previous available algorithms like MD5 , thus providing additional protection to the system by increasing the level of effort for an attacker to successfully determine passwords.

            Note:

            • Pay special attention to the configuration. Incorrect configuration can cause system lock outs.
            • This is an example configuration. Your configuration may differ based on previous changes to the files.
            • The encryption method on the password success line for pam_unix.so and the ENCRYPT_METHOD line in /etc/login.defs should match.

            Edit the /etc/pam.d/common-password file and ensure that sha512 is included and the pam_unix.so success line:

            Example:

            password [success=1 default=ignore] pam_unix.so obscure sha512 use_authtok

            Edit /etc/login.defs and ensure that ENCRYPT_METHOD is set to SHA512 .

            ENCRYPT_METHOD SHA512

            Show Assessment Evidence
            Complex Check
            AND
            Criterion: Ensure at least one file named /etc/login.defs exists and matches pattern (?i)^\h*ENCRYPT_METHOD\h+(sha512|yescrypt)\b
            Existence Check: At Least One Exists
            Item Check: All
            Result: Pass
            Textfilecontent Item
            Name Type Status Value
            Filepath String Exists /etc/login.defs
            Path String Exists /etc
            Filename String Exists login.defs
            Pattern String Exists (?i)^\h*ENCRYPT_METHOD\h+(sha512|yescrypt)\b
            Instance Int Exists 1
            Line String Exists ENCRYPT_METHOD SHA512
            Text String Exists ENCRYPT_METHOD SHA512
            Subexpression String Exists SHA512
            Windows View String Not collected No Value
            Criterion: Ensure at least one file named /etc/pam.d/common-password exists and matches pattern (?i)^\h*password\h+[^#\n\r]+\h+pam_unix.so([^#\n\r]+\h+)?(sha512|yescrypt)\b
            Existence Check: At Least One Exists
            Item Check: All
            Result: Pass
            Textfilecontent Item
            Name Type Status Value
            Filepath String Exists OBFUSCATED [PWD]
            Path String Exists /etc/pam.d
            Filename String Exists OBFUSCATED [PWD]
            Pattern String Exists OBFUSCATED [PWD]
            Instance Int Exists 1
            Line String Exists OBFUSCATED [PWD]
            Text String Exists OBFUSCATED [PWD]
            Subexpression String Exists obscure
            Subexpression String Exists sha512
            Windows View String Not collected No Value


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.4.4_Ensure_strong_password_hashing_algorithm_is_configured"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.894-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/16/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/11"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: IA-5, SC-28</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995397"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995397">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995397"
                                   check="all"
                                   check_existence="at_least_one_exists">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure at least one file named /etc/login.defs exists and matches pattern (?i)^\h*ENCRYPT_METHOD\h+(sha512|yescrypt)\b</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>At Least One Exists</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Textfilecontent Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Filepath</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>/etc/login.defs</td>
                                       </tr>
                                       <tr>
                                          <td>Path</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>/etc</td>
                                       </tr>
                                       <tr>
                                          <td>Filename</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>login.defs</td>
                                       </tr>
                                       <tr>
                                          <td>Pattern</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>(?i)^\h*ENCRYPT_METHOD\h+(sha512|yescrypt)\b</td>
                                       </tr>
                                       <tr>
                                          <td>Instance</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>1</td>
                                       </tr>
                                       <tr>
                                          <td>Line</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>ENCRYPT_METHOD SHA512</td>
                                       </tr>
                                       <tr>
                                          <td>Text</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>ENCRYPT_METHOD SHA512</td>
                                       </tr>
                                       <tr>
                                          <td>Subexpression</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>SHA512</td>
                                       </tr>
                                       <tr>
                                          <td>Windows View</td>
                                          <td>String</td>
                                          <td>Not collected</td>
                                          <td>No Value</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995398"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995398">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995398"
                                   check="all"
                                   check_existence="at_least_one_exists">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure at least one file named /etc/pam.d/common-password exists and matches pattern (?i)^\h*password\h+[^#\n\r]+\h+pam_unix.so([^#\n\r]+\h+)?(sha512|yescrypt)\b</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>At Least One Exists</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Textfilecontent Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Filepath</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>OBFUSCATED [PWD]</td>
                                       </tr>
                                       <tr>
                                          <td>Path</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>/etc/pam.d</td>
                                       </tr>
                                       <tr>
                                          <td>Filename</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>OBFUSCATED [PWD]</td>
                                       </tr>
                                       <tr>
                                          <td>Pattern</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>OBFUSCATED [PWD]</td>
                                       </tr>
                                       <tr>
                                          <td>Instance</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>1</td>
                                       </tr>
                                       <tr>
                                          <td>Line</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>OBFUSCATED [PWD]</td>
                                       </tr>
                                       <tr>
                                          <td>Text</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>OBFUSCATED [PWD]</td>
                                       </tr>
                                       <tr>
                                          <td>Subexpression</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td> obscure </td>
                                       </tr>
                                       <tr>
                                          <td>Subexpression</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>sha512</td>
                                       </tr>
                                       <tr>
                                          <td>Windows View</td>
                                          <td>String</td>
                                          <td>Not collected</td>
                                          <td>No Value</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: IA-5, SC-28

            CIS Controls V7.0:

            • Control 16: Account Monitoring and Control: -- More
              CIS Control Information
              Control: Actively manage the life cycle of system and application accounts - their creation, use, dormancy, deletion - in order to minimize opportunities for attackers to leverage them.
              Subcontrol: 16.4
              Label: Encrypt or Hash all Authentication Credentials
              Description: Encrypt or hash with a salt all authentication credentials when stored.
            • >

            CIS Critical Security Controls V8.0:

            • Control 3: Data Protection: -- More
              CIS Control Information
              Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
              Safeguard: 3.11
              Label: Encrypt Sensitive Data at Rest
              Description: Encrypt sensitive data at rest on servers, applications, and databases containing sensitive data. Storage-layer encryption, also known as server-side encryption, meets the minimum requirement of this Safeguard. Additional encryption methods may include application-layer encryption, also known as client-side encryption, where access to the data storage device(s) does not permit access to the plain-text data.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            Manual

            4.4.5 Ensure all current passwords uses the configured hashing algorithm

            Description:

            Currently used passwords with out of date hashing algorithms may pose a security risk to the system.

            In use passwords should always match the configured hashing algorithm for the system.

            If the administrator wish to force an immediate change on all users as per the output of the audit, execute:

            #!/usr/bin/env bash



            {

            UID_MIN=$(awk '/^\s*UID_MIN/{print $2}' /etc/login.defs)

            awk -F: -v UID_MIN="${UID_MIN}" '( $3 >= UID_MIN && $1 != "nfsnobody" ) { print $1 }' /etc/passwd | xargs -n 1 chage -d 0

            }

            NOTE: This could cause significant temporary CPU load on the system if a large number of users reset their passwords at the same time.

            Impact:

            If the administrator forces a password change, this could cause a large spike in CPU usage if a large number of users change their password during the same time.



            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.4.5_Ensure_all_current_passwords_uses_the_configured_hashing_algorithm"
                               role="unscored"
                               severity="unknown"
                               time="2024-04-14T23:46:23.894-04:00"
                               version="1"
                               weight="0.0">
               <xccdf:result>notchecked</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/16/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/11"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: IA-5, SC-28</xccdf:ident>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: IA-5, SC-28

            CIS Controls V7.0:

            • Control 16: Account Monitoring and Control: -- More
              CIS Control Information
              Control: Actively manage the life cycle of system and application accounts - their creation, use, dormancy, deletion - in order to minimize opportunities for attackers to leverage them.
              Subcontrol: 16.4
              Label: Encrypt or Hash all Authentication Credentials
              Description: Encrypt or hash with a salt all authentication credentials when stored.
            • >

            CIS Critical Security Controls V8.0:

            • Control 3: Data Protection: -- More
              CIS Control Information
              Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
              Safeguard: 3.11
              Label: Encrypt Sensitive Data at Rest
              Description: Encrypt sensitive data at rest on servers, applications, and databases containing sensitive data. Storage-layer encryption, also known as server-side encryption, meets the minimum requirement of this Safeguard. Additional encryption methods may include application-layer encryption, also known as client-side encryption, where access to the data storage device(s) does not permit access to the plain-text data.
              Implementation Group: IG-2
              Security Function: Protect
            • >

            4.5 User Accounts and Environment

            This section provides guidance on setting up secure defaults for system and user accounts and their environment.

            4.5.1 Set Shadow Password Suite Parameters

            While a majority of the password control parameters have been moved to PAM, some parameters are still available through the shadow password suite. Any changes made to /etc/login.defs will only be applied if the usermod command is used. If user IDs are added a different way, use the chage command to effect changes to individual user IDs.

            Fail

            4.5.1.1 Ensure minimum days between password changes is configured

            Description:

            The PASS_MIN_DAYS parameter in /etc/login.defs allows an administrator to prevent users from changing their password until a minimum number of days have passed since the last time the user changed their password. It is recommended that PASS_MIN_DAYS parameter be set to 1 or more days.

            By restricting the frequency of password changes, an administrator can prevent users from repeatedly changing their password in an attempt to circumvent password reuse controls.

            Set the PASS_MIN_DAYS parameter to 1 in /etc/login.defs :

            PASS_MIN_DAYS 1

            Modify user parameters for all users with a password set to match:

            # chage --mindays 1 <user>

            Show Assessment Evidence
            Complex Check
            AND
            Criterion: Ensure at least one file named /etc/login.defs exists and matches pattern (?i)^\h*PASS_MIN_DAYS\h+([1-9][0-9]*)\b
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            No matching system items were found.
            Criterion: Ensure no file named /etc/shadow exists and matches pattern ^[^:\n\r]+:([^\!\*xX:\n\r][^:\n\r]*|\h*):[^:]*:(0|\-1):[^:]*:[^:]*:[^:]*:[^:]*:[^:]*\h*$
            Existence Check: None Exist
            Item Check: All
            Result: Fail
            Textfilecontent Item
            Name Type Status Value
            Filepath String Exists /etc/shadow
            Path String Exists /etc
            Filename String Exists shadow
            Pattern String Exists ^[^:\n\r]+:([^\!\*xX:\n\r][^:\n\r]*|\h*):[^:]*:(0|\-1):[^:]*:[^:]*:[^:]*:[^:]*:[^:]*\h*$
            Instance Int Exists 1
            Line String Exists root:$6$[OBFUSCATED HASHED PWD]
            Text String Exists root:$6$[OBFUSCATED HASHED PWD]
            Subexpression String Exists $6$[OBFUSCATED HASHED PWD]
            Subexpression String Exists 0
            Windows View String Not collected No Value


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.5.1.1_Ensure_minimum_days_between_password_changes_is__configured"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.894-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/5/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995399"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995399">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995399"
                                   check="all"
                                   check_existence="at_least_one_exists">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure at least one file named /etc/login.defs exists and matches pattern (?i)^\h*PASS_MIN_DAYS\h+([1-9][0-9]*)\b</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>At Least One Exists</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995400"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995400">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995400"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure no file named /etc/shadow exists and matches pattern ^[^:\n\r]+:([^\!\*xX:\n\r][^:\n\r]*|\h*):[^:]*:(0|\-1):[^:]*:[^:]*:[^:]*:[^:]*:[^:]*\h*$</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Textfilecontent Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Filepath</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>/etc/shadow</td>
                                       </tr>
                                       <tr>
                                          <td>Path</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>/etc</td>
                                       </tr>
                                       <tr>
                                          <td>Filename</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>shadow</td>
                                       </tr>
                                       <tr>
                                          <td>Pattern</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>^[^:\n\r]+:([^\!\*xX:\n\r][^:\n\r]*|\h*):[^:]*:(0|\-1):[^:]*:[^:]*:[^:]*:[^:]*:[^:]*\h*$</td>
                                       </tr>
                                       <tr>
                                          <td>Instance</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>1</td>
                                       </tr>
                                       <tr>
                                          <td>Line</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>root:$6$[OBFUSCATED HASHED PWD]</td>
                                       </tr>
                                       <tr>
                                          <td>Text</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>root:$6$[OBFUSCATED HASHED PWD]</td>
                                       </tr>
                                       <tr>
                                          <td>Subexpression</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>$6$[OBFUSCATED HASHED PWD]</td>
                                       </tr>
                                       <tr>
                                          <td>Subexpression</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>0</td>
                                       </tr>
                                       <tr>
                                          <td>Windows View</td>
                                          <td>String</td>
                                          <td>Not collected</td>
                                          <td>No Value</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5

            CIS Controls V7.0:

            • Control 4: Controlled Use of Administrative Privileges: -- More
              CIS Control Information
              Control: The processes and tools used to track/control/prevent/correct the use, assignment, and configuration of administrative privileges on computers, networks, and applications.
              Subcontrol: 4.4
              Label: Use Unique Passwords
              Description: Where multi-factor authentication is not supported (such as local administrator, root, or service accounts), accounts will use passwords that are unique to that system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 5: Account Management: -- More
              CIS Control Information
              Control: Use processes and tools to assign and manage authorization to credentials for user accounts, including administrator accounts, as well as service accounts, to enterprise assets and software.
              Safeguard: 5.2
              Label: Use Unique Passwords
              Description: Use unique passwords for all enterprise assets. Best practice implementation includes, at a minimum, an 8-character password for accounts using MFA and a 14-character password for accounts not using MFA.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Fail

            4.5.1.2 Ensure password expiration is 365 days or less

            Description:

            The PASS_MAX_DAYS parameter in /etc/login.defs allows an administrator to force passwords to expire once they reach a defined age.

            The window of opportunity for an attacker to leverage compromised credentials or successfully compromise credentials via an online brute force attack is limited by the age of the password. Therefore, reducing the maximum age of a password also reduces an attacker's window of opportunity. It is recommended that the PASS_MAX_DAYS parameter does not exceed 365 days and is greater than the value of PASS_MIN_DAYS .

            Set the PASS_MAX_DAYS parameter to conform to site policy in /etc/login.defs :

            PASS_MAX_DAYS 365

            Modify user parameters for all users with a password set to match:

            # chage --maxdays 365 <user>

            Show Assessment Evidence
            Complex Check
            AND
            Criterion: Ensure at least one file named /etc/login.defs exists and matches pattern (?i)^\h*PASS_MAX_DAYS\h+(36[0-5]|3[0-5][0-9]|[1-2][0-9][0-9]|[1-9][0-9]|[2-9])\b
            Existence Check: At Least One Exists
            Item Check: All
            Result: Fail
            No matching system items were found.
            Criterion: Ensure no file named /etc/shadow exists and matches pattern ^[^#:\n\r]+:([^\!\*xX:\n\r][^:\n\r]*|\h*):[^:\n\r]*:[^:\n\r]*:(\h*|-1|0|36[6-9]|3[7-9][0-9]|[4-9][0-9]{2}|[1-9][0-9]{3,}):[^:\n\r]*:[^:\n\r]*:[^:\n\r]*:[^:\n\r]*\h*$
            Existence Check: None Exist
            Item Check: All
            Result: Fail
            Textfilecontent Item
            Name Type Status Value
            Filepath String Exists /etc/shadow
            Path String Exists /etc
            Filename String Exists shadow
            Pattern String Exists ^[^#:\n\r]+:([^\!\*xX:\n\r][^:\n\r]*|\h*):[^:\n\r]*:[^:\n\r]*:(\h*|-1|0|36[6-9]|3[7-9][0-9]|[4-9][0-9]{2}|[1-9][0-9]{3,}):[^:\n\r]*:[^:\n\r]*:[^:\n\r]*:[^:\n\r]*\h*$
            Instance Int Exists 1
            Line String Exists root:$6$[OBFUSCATED HASHED PWD]
            Text String Exists root:$6$[OBFUSCATED HASHED PWD]
            Subexpression String Exists $6$[OBFUSCATED HASHED PWD]
            Subexpression String Exists 99999
            Windows View String Not collected No Value


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.5.1.2_Ensure_password_expiration_is_365_days_or_less"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.895-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>fail</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/5/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:ident system="URL">https://www.cisecurity.org/white-papers/cis-password-policy-guide/</xccdf:ident>
               <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5</xccdf:ident>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995401"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995401">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995401"
                                   check="all"
                                   check_existence="at_least_one_exists">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure at least one file named /etc/login.defs exists and matches pattern (?i)^\h*PASS_MAX_DAYS\h+(36[0-5]|3[0-5][0-9]|[1-2][0-9][0-9]|[1-9][0-9]|[2-9])\b</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>At Least One Exists</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995402"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995402">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995402"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure no file named /etc/shadow exists and matches pattern ^[^#:\n\r]+:([^\!\*xX:\n\r][^:\n\r]*|\h*):[^:\n\r]*:[^:\n\r]*:(\h*|-1|0|36[6-9]|3[7-9][0-9]|[4-9][0-9]{2}|[1-9][0-9]{3,}):[^:\n\r]*:[^:\n\r]*:[^:\n\r]*:[^:\n\r]*\h*$</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="fail">Fail</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Textfilecontent Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Filepath</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>/etc/shadow</td>
                                       </tr>
                                       <tr>
                                          <td>Path</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>/etc</td>
                                       </tr>
                                       <tr>
                                          <td>Filename</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>shadow</td>
                                       </tr>
                                       <tr>
                                          <td>Pattern</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>^[^#:\n\r]+:([^\!\*xX:\n\r][^:\n\r]*|\h*):[^:\n\r]*:[^:\n\r]*:(\h*|-1|0|36[6-9]|3[7-9][0-9]|[4-9][0-9]{2}|[1-9][0-9]{3,}):[^:\n\r]*:[^:\n\r]*:[^:\n\r]*:[^:\n\r]*\h*$</td>
                                       </tr>
                                       <tr>
                                          <td>Instance</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>1</td>
                                       </tr>
                                       <tr>
                                          <td>Line</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>root:$6$[OBFUSCATED HASHED PWD]</td>
                                       </tr>
                                       <tr>
                                          <td>Text</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>root:$6$[OBFUSCATED HASHED PWD]</td>
                                       </tr>
                                       <tr>
                                          <td>Subexpression</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>$6$[OBFUSCATED HASHED PWD]</td>
                                       </tr>
                                       <tr>
                                          <td>Subexpression</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>99999</td>
                                       </tr>
                                       <tr>
                                          <td>Windows View</td>
                                          <td>String</td>
                                          <td>Not collected</td>
                                          <td>No Value</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

            • URL: https://www.cisecurity.org/white-papers/cis-password-policy-guide/
            • URL: NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5

            CIS Controls V7.0:

            • Control 4: Controlled Use of Administrative Privileges: -- More
              CIS Control Information
              Control: The processes and tools used to track/control/prevent/correct the use, assignment, and configuration of administrative privileges on computers, networks, and applications.
              Subcontrol: 4.4
              Label: Use Unique Passwords
              Description: Where multi-factor authentication is not supported (such as local administrator, root, or service accounts), accounts will use passwords that are unique to that system.
            • >

            CIS Critical Security Controls V8.0:

            • Control 5: Account Management: -- More
              CIS Control Information
              Control: Use processes and tools to assign and manage authorization to credentials for user accounts, including administrator accounts, as well as service accounts, to enterprise assets and software.
              Safeguard: 5.2
              Label: Use Unique Passwords
              Description: Use unique passwords for all enterprise assets. Best practice implementation includes, at a minimum, an 8-character password for accounts using MFA and a 14-character password for accounts not using MFA.
              Implementation Group: IG-1
              Security Function: Protect
            • >

            Pass

            4.5.1.3 Ensure password expiration warning days is 7 or more

            Description:

            The PASS_WARN_AGE parameter in /etc/login.defs allows an administrator to notify users that their password will expire in a defined number of days. It is recommended that the PASS_WARN_AGE parameter be set to 7 or more days.

            Providing an advance warning that a password will be expiring gives users time to think of a secure password. Users caught unaware may choose a simple password or write it down where it may be discovered.

            Set the PASS_WARN_AGE parameter to 7 in /etc/login.defs :

            PASS_WARN_AGE 7

            Modify user parameters for all users with a password set to match:

            # chage --warndays 7 <user>

            Show Assessment Evidence
            Complex Check
            AND
            Criterion: Ensure at least one file named /etc/login.defs exists and matches pattern (?i)^\h*PASS_WARN_AGE\h+([7-9]|[1-9][0-9]+)\b
            Existence Check: At Least One Exists
            Item Check: All
            Result: Pass
            Textfilecontent Item
            Name Type Status Value
            Filepath String Exists /etc/login.defs
            Path String Exists /etc
            Filename String Exists login.defs
            Pattern String Exists (?i)^\h*PASS_WARN_AGE\h+([7-9]|[1-9][0-9]+)\b
            Instance Int Exists 1
            Line String Exists PASS_WARN_AGE 7
            Text String Exists PASS_WARN_AGE 7
            Subexpression String Exists 7
            Windows View String Not collected No Value
            Criterion: Ensure no file named /etc/shadow exists and matches pattern ^[^#:\n\r]+:([^\!\*xX:\n\r][^:\n\r]*|\h*):[^:\n\r]*:[^:\n\r]*:[^:\n\r]*:([0-6]|-1):[^:\n\r]*:[^:\n\r]*:[^:\n\r]*\h*$
            Existence Check: None Exist
            Item Check: All
            Result: Pass
            No matching system items were found.


            Show Rule Result XML
            <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:notes="http://benchmarks.cisecurity.org/notes"
                               xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                               xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                               xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                               xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                               xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                               xmlns="http://checklists.nist.gov/xccdf/1.2"
                               xmlns:xhtml="http://www.w3.org/1999/xhtml"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                               xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                               xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                               xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                               idref="xccdf_org.cisecurity.benchmarks_rule_4.5.1.3_Ensure_password_expiration_warning_days_is_7_or_more"
                               role="full"
                               severity="unknown"
                               time="2024-04-14T23:46:23.895-04:00"
                               version="1"
                               weight="1.0">
               <xccdf:result>pass</xccdf:result>
               <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/4/subcontrol/4"
                            system="http://cisecurity.org/20-cc/v7.0"/>
               <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/5/subcontrol/2"
                            system="http://cisecurity.org/20-cc/v8.0"/>
               <xccdf:complex-check operator="AND" negate="false">
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995403"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995403">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995403"
                                   check="all"
                                   check_existence="at_least_one_exists">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure at least one file named /etc/login.defs exists and matches pattern (?i)^\h*PASS_WARN_AGE\h+([7-9]|[1-9][0-9]+)\b</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>At Least One Exists</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <caption>Textfilecontent Item</caption>
                                    <thead>
                                       <tr>
                                          <th scope="col">Name</th>
                                          <th scope="col">Type</th>
                                          <th scope="col">Status</th>
                                          <th scope="col">Value</th>
                                       </tr>
                                    </thead>
                                    <tbody class="tbe">
                                       <tr>
                                          <td>Filepath</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>/etc/login.defs</td>
                                       </tr>
                                       <tr>
                                          <td>Path</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>/etc</td>
                                       </tr>
                                       <tr>
                                          <td>Filename</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>login.defs</td>
                                       </tr>
                                       <tr>
                                          <td>Pattern</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>(?i)^\h*PASS_WARN_AGE\h+([7-9]|[1-9][0-9]+)\b</td>
                                       </tr>
                                       <tr>
                                          <td>Instance</td>
                                          <td>Int</td>
                                          <td>Exists</td>
                                          <td>1</td>
                                       </tr>
                                       <tr>
                                          <td>Line</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>PASS_WARN_AGE	7</td>
                                       </tr>
                                       <tr>
                                          <td>Text</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>PASS_WARN_AGE	7</td>
                                       </tr>
                                       <tr>
                                          <td>Subexpression</td>
                                          <td>String</td>
                                          <td>Exists</td>
                                          <td>7</td>
                                       </tr>
                                       <tr>
                                          <td>Windows View</td>
                                          <td>String</td>
                                          <td>Not collected</td>
                                          <td>No Value</td>
                                       </tr>
                                    </tbody>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                               negate="false"
                               multi-check="false">
                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995404"/>
                     <evidence xmlns="http://cisecurity.org/evidence">
                        <div class="definition"
                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995404">
                           <div class="criteria">
                              <div class="criterion"
                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995404"
                                   check="all"
                                   check_existence="none_exist">
                                 <table class="evidence-sep" width="100%">
                                    <tbody class="tbe">
                                       <tr>
                                          <td class="bold">Criterion:</td>
                                          <td>Ensure no file named /etc/shadow exists and matches pattern ^[^#:\n\r]+:([^\!\*xX:\n\r][^:\n\r]*|\h*):[^:\n\r]*:[^:\n\r]*:[^:\n\r]*:([0-6]|-1):[^:\n\r]*:[^:\n\r]*:[^:\n\r]*\h*$</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Existence Check:</td>
                                          <td>None Exist</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Item Check:</td>
                                          <td>All</td>
                                       </tr>
                                       <tr>
                                          <td class="bold">Result:</td>
                                          <td class="pass">Pass</td>
                                       </tr>
                                    </tbody>
                                 </table>
                                 <table class="evidence" width="100%">
                                    <tr>
                                       <td>No matching system items were found.</td>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                        </div>
                     </evidence>
                  </xccdf:check>
               </xccdf:complex-check>
            </xccdf:rule-result>
            

            References:

              CIS Controls V7.0:

              • Control 4: Controlled Use of Administrative Privileges: -- More
                CIS Control Information
                Control: The processes and tools used to track/control/prevent/correct the use, assignment, and configuration of administrative privileges on computers, networks, and applications.
                Subcontrol: 4.4
                Label: Use Unique Passwords
                Description: Where multi-factor authentication is not supported (such as local administrator, root, or service accounts), accounts will use passwords that are unique to that system.
              • >

              CIS Critical Security Controls V8.0:

              • Control 5: Account Management: -- More
                CIS Control Information
                Control: Use processes and tools to assign and manage authorization to credentials for user accounts, including administrator accounts, as well as service accounts, to enterprise assets and software.
                Safeguard: 5.2
                Label: Use Unique Passwords
                Description: Use unique passwords for all enterprise assets. Best practice implementation includes, at a minimum, an 8-character password for accounts using MFA and a 14-character password for accounts not using MFA.
                Implementation Group: IG-1
                Security Function: Protect
              • >

              Fail

              4.5.1.4 Ensure inactive password lock is 30 days or less

              Description:

              User accounts that have been inactive for over a given period of time can be automatically disabled. It is recommended that accounts that are inactive for 30 days after password expiration be disabled.

              Inactive accounts pose a threat to system security since the users are not logging in to notice failed login attempts or other anomalies.

              Run the following command to set the default password inactivity period to 30 days:

              # useradd -D -f 30

              Modify user parameters for all users with a password set to match:

              # chage --inactive 30 <user>

              Show Assessment Evidence
              Complex Check
              AND
              Criterion: Ensure at least one file named /etc/default/useradd exists and matches pattern (?i)^\h*INACTIVE\h*=\h*(30|[1-2][0-9]|[0-9])\b
              Existence Check: At Least One Exists
              Item Check: All
              Result: Fail
              No matching system items were found.
              Criterion: Ensure no file named /etc/shadow exists and matches pattern ^[^#:\n\r]+:([^\!\*xX:\n\r][^:\n\r]*|\h*):[^:\n\r]*:[^:\n\r]*:[^:\n\r]*:[^:\n\r]*:(\s*|-1|3[1-9]|[4-9][0-9]|[1-9][0-9]{2,}):[^:\n\r]*:[^:\n\r]*\h*$
              Existence Check: None Exist
              Item Check: All
              Result: Fail
              Textfilecontent Item
              Name Type Status Value
              Filepath String Exists /etc/shadow
              Path String Exists /etc
              Filename String Exists shadow
              Pattern String Exists ^[^#:\n\r]+:([^\!\*xX:\n\r][^:\n\r]*|\h*):[^:\n\r]*:[^:\n\r]*:[^:\n\r]*:[^:\n\r]*:(\s*|-1|3[1-9]|[4-9][0-9]|[1-9][0-9]{2,}):[^:\n\r]*:[^:\n\r]*\h*$
              Instance Int Exists 1
              Line String Exists root:$6$[OBFUSCATED HASHED PWD]
              Text String Exists root:$6$[OBFUSCATED HASHED PWD]
              Subexpression String Exists $6$[OBFUSCATED HASHED PWD]
              Subexpression String Exists No Value
              Windows View String Not collected No Value


              Show Rule Result XML
              <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                 xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                 xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                 xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                 xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                 xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                 xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                 xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                 xmlns="http://checklists.nist.gov/xccdf/1.2"
                                 xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                 xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                 xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                 xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                 xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                 idref="xccdf_org.cisecurity.benchmarks_rule_4.5.1.4_Ensure_inactive_password_lock_is_30_days_or_less"
                                 role="full"
                                 severity="unknown"
                                 time="2024-04-14T23:46:23.895-04:00"
                                 version="1"
                                 weight="1.0">
                 <xccdf:result>fail</xccdf:result>
                 <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/4/subcontrol/4"
                              system="http://cisecurity.org/20-cc/v7.0"/>
                 <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/5/subcontrol/2"
                              system="http://cisecurity.org/20-cc/v8.0"/>
                 <xccdf:complex-check operator="AND" negate="false">
                    <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                 negate="false"
                                 multi-check="false">
                       <xccdf:check-content-ref href="#OVAL-Results-1"
                                                name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995405"/>
                       <evidence xmlns="http://cisecurity.org/evidence">
                          <div class="definition"
                               id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995405">
                             <div class="criteria">
                                <div class="criterion"
                                     id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995405"
                                     check="all"
                                     check_existence="at_least_one_exists">
                                   <table class="evidence-sep" width="100%">
                                      <tbody class="tbe">
                                         <tr>
                                            <td class="bold">Criterion:</td>
                                            <td>Ensure at least one file named /etc/default/useradd exists and matches pattern (?i)^\h*INACTIVE\h*=\h*(30|[1-2][0-9]|[0-9])\b</td>
                                         </tr>
                                         <tr>
                                            <td class="bold">Existence Check:</td>
                                            <td>At Least One Exists</td>
                                         </tr>
                                         <tr>
                                            <td class="bold">Item Check:</td>
                                            <td>All</td>
                                         </tr>
                                         <tr>
                                            <td class="bold">Result:</td>
                                            <td class="fail">Fail</td>
                                         </tr>
                                      </tbody>
                                   </table>
                                   <table class="evidence" width="100%">
                                      <tr>
                                         <td>No matching system items were found.</td>
                                      </tr>
                                   </table>
                                </div>
                             </div>
                          </div>
                       </evidence>
                    </xccdf:check>
                    <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                 negate="false"
                                 multi-check="false">
                       <xccdf:check-content-ref href="#OVAL-Results-1"
                                                name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995406"/>
                       <evidence xmlns="http://cisecurity.org/evidence">
                          <div class="definition"
                               id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995406">
                             <div class="criteria">
                                <div class="criterion"
                                     id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995406"
                                     check="all"
                                     check_existence="none_exist">
                                   <table class="evidence-sep" width="100%">
                                      <tbody class="tbe">
                                         <tr>
                                            <td class="bold">Criterion:</td>
                                            <td>Ensure no file named /etc/shadow exists and matches pattern ^[^#:\n\r]+:([^\!\*xX:\n\r][^:\n\r]*|\h*):[^:\n\r]*:[^:\n\r]*:[^:\n\r]*:[^:\n\r]*:(\s*|-1|3[1-9]|[4-9][0-9]|[1-9][0-9]{2,}):[^:\n\r]*:[^:\n\r]*\h*$</td>
                                         </tr>
                                         <tr>
                                            <td class="bold">Existence Check:</td>
                                            <td>None Exist</td>
                                         </tr>
                                         <tr>
                                            <td class="bold">Item Check:</td>
                                            <td>All</td>
                                         </tr>
                                         <tr>
                                            <td class="bold">Result:</td>
                                            <td class="fail">Fail</td>
                                         </tr>
                                      </tbody>
                                   </table>
                                   <table class="evidence" width="100%">
                                      <caption>Textfilecontent Item</caption>
                                      <thead>
                                         <tr>
                                            <th scope="col">Name</th>
                                            <th scope="col">Type</th>
                                            <th scope="col">Status</th>
                                            <th scope="col">Value</th>
                                         </tr>
                                      </thead>
                                      <tbody class="tbe">
                                         <tr>
                                            <td>Filepath</td>
                                            <td>String</td>
                                            <td>Exists</td>
                                            <td>/etc/shadow</td>
                                         </tr>
                                         <tr>
                                            <td>Path</td>
                                            <td>String</td>
                                            <td>Exists</td>
                                            <td>/etc</td>
                                         </tr>
                                         <tr>
                                            <td>Filename</td>
                                            <td>String</td>
                                            <td>Exists</td>
                                            <td>shadow</td>
                                         </tr>
                                         <tr>
                                            <td>Pattern</td>
                                            <td>String</td>
                                            <td>Exists</td>
                                            <td>^[^#:\n\r]+:([^\!\*xX:\n\r][^:\n\r]*|\h*):[^:\n\r]*:[^:\n\r]*:[^:\n\r]*:[^:\n\r]*:(\s*|-1|3[1-9]|[4-9][0-9]|[1-9][0-9]{2,}):[^:\n\r]*:[^:\n\r]*\h*$</td>
                                         </tr>
                                         <tr>
                                            <td>Instance</td>
                                            <td>Int</td>
                                            <td>Exists</td>
                                            <td>1</td>
                                         </tr>
                                         <tr>
                                            <td>Line</td>
                                            <td>String</td>
                                            <td>Exists</td>
                                            <td>root:$6$[OBFUSCATED HASHED PWD]</td>
                                         </tr>
                                         <tr>
                                            <td>Text</td>
                                            <td>String</td>
                                            <td>Exists</td>
                                            <td>root:$6$[OBFUSCATED HASHED PWD]</td>
                                         </tr>
                                         <tr>
                                            <td>Subexpression</td>
                                            <td>String</td>
                                            <td>Exists</td>
                                            <td>$6$[OBFUSCATED HASHED PWD]</td>
                                         </tr>
                                         <tr>
                                            <td>Subexpression</td>
                                            <td>String</td>
                                            <td>Exists</td>
                                            <td>No Value</td>
                                         </tr>
                                         <tr>
                                            <td>Windows View</td>
                                            <td>String</td>
                                            <td>Not collected</td>
                                            <td>No Value</td>
                                         </tr>
                                      </tbody>
                                   </table>
                                </div>
                             </div>
                          </div>
                       </evidence>
                    </xccdf:check>
                 </xccdf:complex-check>
              </xccdf:rule-result>
              

              References:

                CIS Controls V7.0:

                • Control 4: Controlled Use of Administrative Privileges: -- More
                  CIS Control Information
                  Control: The processes and tools used to track/control/prevent/correct the use, assignment, and configuration of administrative privileges on computers, networks, and applications.
                  Subcontrol: 4.4
                  Label: Use Unique Passwords
                  Description: Where multi-factor authentication is not supported (such as local administrator, root, or service accounts), accounts will use passwords that are unique to that system.
                • >

                CIS Critical Security Controls V8.0:

                • Control 5: Account Management: -- More
                  CIS Control Information
                  Control: Use processes and tools to assign and manage authorization to credentials for user accounts, including administrator accounts, as well as service accounts, to enterprise assets and software.
                  Safeguard: 5.2
                  Label: Use Unique Passwords
                  Description: Use unique passwords for all enterprise assets. Best practice implementation includes, at a minimum, an 8-character password for accounts using MFA and a 14-character password for accounts not using MFA.
                  Implementation Group: IG-1
                  Security Function: Protect
                • >

                Pass

                4.5.1.5 Ensure all users last password change date is in the past

                Description:

                All users should have a password change date in the past.

                If a users recorded password change date is in the future then they could bypass any set password expiration.

                Investigate any users with a password change date in the future and correct them. Locking the account, expiring the password, or resetting the password manually may be appropriate.

                Show Assessment Evidence
                Complex Check
                AND
                Script: sce/nix_password_change_past.sh
                Result: Pass
                Exit Value: 101
                Output:
                • - Audit Result:
                • ** PASS **
                • - All user password changes are in the past
                No error lines were collected.


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_4.5.1.5_Ensure_all_users_last_password_change_date_is_in_the_past"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.895-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>pass</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/4/subcontrol/4"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/5/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: IA-5</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://open-scap.org/page/SCE"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="sce/nix_password_change_past.sh"/>
                         <xccdf:check-content>
                            <command_result href="sce/nix_password_change_past.sh"
                                            xccdf="pass"
                                            script="/root/Assessor/sce/nix_password_change_past.sh"
                                            exit-value="101">
                               <out>
                                  <l/>
                                  <l>- Audit Result:</l>
                                  <l>  ** PASS **</l>
                                  <l> - All user password changes are in the past </l>
                                  <l/>
                               </out>
                               <err/>
                               <env/>
                            </command_result>
                         </xccdf:check-content>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="sce">
                               <table class="evidence-sep" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td class="bold">Script:</td>
                                        <td>sce/nix_password_change_past.sh</td>
                                     </tr>
                                     <tr>
                                        <td class="bold">Result:</td>
                                        <td class="pass">Pass</td>
                                     </tr>
                                     <tr>
                                        <td class="bold">Exit Value:</td>
                                        <td>101</td>
                                     </tr>
                                  </tbody>
                               </table>
                               <table class="evidence" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td class="bold">Output:</td>
                                        <td>
                                           <ul class="unstyled">
                                              <li/>
                                              <li>- Audit Result:</li>
                                              <li>  ** PASS **</li>
                                              <li> - All user password changes are in the past </li>
                                              <li/>
                                           </ul>
                                        </td>
                                     </tr>
                                  </tbody>
                               </table>
                               <table class="evidence" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td>No error lines were collected.</td>
                                     </tr>
                                  </tbody>
                               </table>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: IA-5

                CIS Controls V7.0:

                • Control 4: Controlled Use of Administrative Privileges: -- More
                  CIS Control Information
                  Control: The processes and tools used to track/control/prevent/correct the use, assignment, and configuration of administrative privileges on computers, networks, and applications.
                  Subcontrol: 4.4
                  Label: Use Unique Passwords
                  Description: Where multi-factor authentication is not supported (such as local administrator, root, or service accounts), accounts will use passwords that are unique to that system.
                • >

                CIS Critical Security Controls V8.0:

                • Control 5: Account Management: -- More
                  CIS Control Information
                  Control: Use processes and tools to assign and manage authorization to credentials for user accounts, including administrator accounts, as well as service accounts, to enterprise assets and software.
                  Safeguard: 5.2
                  Label: Use Unique Passwords
                  Description: Use unique passwords for all enterprise assets. Best practice implementation includes, at a minimum, an 8-character password for accounts using MFA and a 14-character password for accounts not using MFA.
                  Implementation Group: IG-1
                  Security Function: Protect
                • >

                Fail

                4.5.1.6 Ensure the number of changed characters in a new password is configured

                Description:

                The pwqualitydifok option sets the number of characters in a password that must not be present in the old password.

                Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks.

                Password complexity is one factor of several that determines how long it takes to crack a password. The more complex the password, the greater the number of possible combinations that need to be tested before the password is compromised.

                Edit or add the following line in /etc/security/pwquality.conf to a value of 2 or more:

                difok = 2

                Show Assessment Evidence
                Complex Check
                AND
                Criterion: Ensure at least one file named /etc/security/pwquality.conf exists and matches pattern (?i)^\h*difok\h*=\h*([2-9]|[1-9][0-9]+)\b
                Existence Check: At Least One Exists
                Item Check: All
                Result: Fail
                No matching system items were found.


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_4.5.1.6_Ensure_the_number_of_changed_characters_in_a_new_password_is_configured"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.895-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>fail</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/4/subcontrol/4"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/5/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: IA-5</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995408"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995408">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995408"
                                       check="all"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure at least one file named /etc/security/pwquality.conf exists and matches pattern (?i)^\h*difok\h*=\h*([2-9]|[1-9][0-9]+)\b</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="fail">Fail</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <tr>
                                           <td>No matching system items were found.</td>
                                        </tr>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: IA-5

                CIS Controls V7.0:

                • Control 4: Controlled Use of Administrative Privileges: -- More
                  CIS Control Information
                  Control: The processes and tools used to track/control/prevent/correct the use, assignment, and configuration of administrative privileges on computers, networks, and applications.
                  Subcontrol: 4.4
                  Label: Use Unique Passwords
                  Description: Where multi-factor authentication is not supported (such as local administrator, root, or service accounts), accounts will use passwords that are unique to that system.
                • >

                CIS Critical Security Controls V8.0:

                • Control 5: Account Management: -- More
                  CIS Control Information
                  Control: Use processes and tools to assign and manage authorization to credentials for user accounts, including administrator accounts, as well as service accounts, to enterprise assets and software.
                  Safeguard: 5.2
                  Label: Use Unique Passwords
                  Description: Use unique passwords for all enterprise assets. Best practice implementation includes, at a minimum, an 8-character password for accounts using MFA and a 14-character password for accounts not using MFA.
                  Implementation Group: IG-1
                  Security Function: Protect
                • >

                Fail

                4.5.1.7 Ensure preventing the use of dictionary words for passwords is configured

                Description:

                The pwqualitydictcheck option sets whether to check for the words from the cracklib dictionary.

                If the operating system allows the user to select passwords based on dictionary words, this increases the chances of password compromise by increasing the opportunity for successful guesses, and brute-force attacks.

                Edit or add the following line in /etc/security/pwquality.conf to a value of 1 :

                dictcheck = 1

                Show Assessment Evidence
                Complex Check
                AND
                Criterion: Ensure at least one file named /etc/security/pwquality.conf exists and matches pattern (?i)^\h*dictcheck\h*=\h*[^0]
                Existence Check: At Least One Exists
                Item Check: All
                Result: Fail
                No matching system items were found.


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_4.5.1.7_Ensure_preventing_the_use_of_dictionary_words_for_passwords_is_configured"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.895-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>fail</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/4/subcontrol/4"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/5/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: IA-5</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995409"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995409">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995409"
                                       check="all"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure at least one file named /etc/security/pwquality.conf exists and matches pattern (?i)^\h*dictcheck\h*=\h*[^0]</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="fail">Fail</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <tr>
                                           <td>No matching system items were found.</td>
                                        </tr>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: IA-5

                CIS Controls V7.0:

                • Control 4: Controlled Use of Administrative Privileges: -- More
                  CIS Control Information
                  Control: The processes and tools used to track/control/prevent/correct the use, assignment, and configuration of administrative privileges on computers, networks, and applications.
                  Subcontrol: 4.4
                  Label: Use Unique Passwords
                  Description: Where multi-factor authentication is not supported (such as local administrator, root, or service accounts), accounts will use passwords that are unique to that system.
                • >

                CIS Critical Security Controls V8.0:

                • Control 5: Account Management: -- More
                  CIS Control Information
                  Control: Use processes and tools to assign and manage authorization to credentials for user accounts, including administrator accounts, as well as service accounts, to enterprise assets and software.
                  Safeguard: 5.2
                  Label: Use Unique Passwords
                  Description: Use unique passwords for all enterprise assets. Best practice implementation includes, at a minimum, an 8-character password for accounts using MFA and a 14-character password for accounts not using MFA.
                  Implementation Group: IG-1
                  Security Function: Protect
                • >

                Pass

                4.5.2 Ensure system accounts are secured

                Description:

                There are a number of accounts provided with most distributions that are used to manage applications and are not intended to provide an interactive shell.

                It is important to make sure that accounts that are not being used by regular users are prevented from being used to provide an interactive shell. By default, most distributions set the password field for these accounts to an invalid string, but it is also recommended that the shell field in the password file be set to the nologin shell. This prevents the account from potentially being used to run any commands.

                Set the shell for any accounts returned by the audit to nologin:

                # usermod -s $(which nologin) <user>

                Lock any non root accounts returned by the audit:

                # usermod -L <user>

                The following script will:

                • Set the shell for any accounts returned by the audit to nologin
                • Lock any non root system accounts returned by the audit:
                #!/usr/bin/env bash



                {

                l_output="" l_output2=""

                l_valid_shells="^($( awk -F\/ '$NF != "nologin" {print}' /etc/shells | sed -rn '/^\//{s,/,\\\\/,g;p}' | paste -s -d '|' - ))$"

                a_users=(); a_ulock=() # initialize arrays

                while read -r l_user; do # change system accounts that have a valid login shell to nolog shell

                echo -e " - System account \"$l_user\" has a valid logon shell, changing shell to \"$(which nologin)\""

                usermod -s "$(which nologin)" "$l_user"

                done < <(awk -v pat="$l_valid_shells" -F: '($1!~/(root|sync|shutdown|halt|^\+)/ && $3<'"$(awk '/^\s*UID_MIN/{print $2}' /etc/login.defs)"' && $(NF) ~ pat) { print $1 }' /etc/passwd)

                while read -r l_ulock; do # Lock system accounts that aren't locked

                echo -e " - System account \"$l_ulock\" is not locked, locking account"

                usermod -L "$l_ulock"

                done < <(awk -v pat="$l_valid_shells" -F: '($1!~/(root|^\+)/ && $2!~/LK?/ && $3<'"$(awk '/^\s*UID_MIN/{print $2}' /etc/login.defs)"' && $(NF) ~ pat) { print $1 }' /etc/passwd)

                }

                Show Assessment Evidence
                Complex Check
                AND
                Script: sce/nix_system_accounts_secured_chk.sh
                Result: Pass
                Exit Value: 101
                Output:
                • - Audit Result:
                • ** PASS **
                • - * Correctly configured * :
                • - local system accounts login is disabled
                • - local system accounts are locked
                No error lines were collected.


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_4.5.2_Ensure_system_accounts_are_secured"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.895-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>pass</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-2. AC-3, AC-5, MP-2</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://open-scap.org/page/SCE"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="sce/nix_system_accounts_secured_chk.sh"/>
                         <xccdf:check-content>
                            <command_result href="sce/nix_system_accounts_secured_chk.sh"
                                            xccdf="pass"
                                            script="/root/Assessor/sce/nix_system_accounts_secured_chk.sh"
                                            exit-value="101">
                               <out>
                                  <l/>
                                  <l>- Audit Result:</l>
                                  <l>  ** PASS **</l>
                                  <l> - * Correctly configured * :</l>
                                  <l/>
                                  <l>  - local system accounts login is disabled</l>
                                  <l>  - local system accounts are locked</l>
                                  <l/>
                               </out>
                               <err/>
                               <env/>
                            </command_result>
                         </xccdf:check-content>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="sce">
                               <table class="evidence-sep" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td class="bold">Script:</td>
                                        <td>sce/nix_system_accounts_secured_chk.sh</td>
                                     </tr>
                                     <tr>
                                        <td class="bold">Result:</td>
                                        <td class="pass">Pass</td>
                                     </tr>
                                     <tr>
                                        <td class="bold">Exit Value:</td>
                                        <td>101</td>
                                     </tr>
                                  </tbody>
                               </table>
                               <table class="evidence" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td class="bold">Output:</td>
                                        <td>
                                           <ul class="unstyled">
                                              <li/>
                                              <li>- Audit Result:</li>
                                              <li>  ** PASS **</li>
                                              <li> - * Correctly configured * :</li>
                                              <li/>
                                              <li>  - local system accounts login is disabled</li>
                                              <li>  - local system accounts are locked</li>
                                              <li/>
                                           </ul>
                                        </td>
                                     </tr>
                                  </tbody>
                               </table>
                               <table class="evidence" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td>No error lines were collected.</td>
                                     </tr>
                                  </tbody>
                               </table>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: AC-2. AC-3, AC-5, MP-2

                CIS Controls V7.0:

                • Control 14: Controlled Access Based on the Need to Know: -- More
                  CIS Control Information
                  Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
                  Subcontrol: 14.6
                  Label: Protect Information through Access Control Lists
                  Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
                • >

                CIS Critical Security Controls V8.0:

                • Control 3: Data Protection: -- More
                  CIS Control Information
                  Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
                  Safeguard: 3.3
                  Label: Configure Data Access Control Lists
                  Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
                  Implementation Group: IG-1
                  Security Function: Protect
                • >

                Pass

                4.5.3 Ensure default group for the root account is GID 0

                Description:

                The usermod command can be used to specify which group the root user belongs to. This affects permissions of files that are created by the root user.

                Using GID 0 for the root account helps prevent root -owned files from accidentally becoming accessible to non-privileged users.

                Run the following command to set the root user default group to GID 0 :

                # usermod -g 0 root

                Show Assessment Evidence
                Complex Check
                AND
                Criterion: Linux Custom Object "Default Group Set For root User"
                Existence Check: At Least One Exists
                Item Check: All
                Result: Pass
                Password Item
                Name Type Status Value
                Username String Exists root
                Password String Exists x
                User Id Int Exists 0
                Group Id Int Exists 0
                Gcos String Exists root
                Home Dir String Exists /root
                Login Shell String Exists /bin/bash
                Last Login Int Does not exist No Value


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_4.5.3_Ensure_default_group_for_the_root_account_is_GID_0"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.895-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>pass</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995411"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995411">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995411"
                                       check="all"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Linux Custom Object "Default Group Set For root User"</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="pass">Pass</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <caption>Password Item</caption>
                                        <thead>
                                           <tr>
                                              <th scope="col">Name</th>
                                              <th scope="col">Type</th>
                                              <th scope="col">Status</th>
                                              <th scope="col">Value</th>
                                           </tr>
                                        </thead>
                                        <tbody class="tbe">
                                           <tr>
                                              <td>Username</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>root</td>
                                           </tr>
                                           <tr>
                                              <td>Password</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>x</td>
                                           </tr>
                                           <tr>
                                              <td>User Id</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>0</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Group Id</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>0</td>
                                           </tr>
                                           <tr>
                                              <td>Gcos</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>root</td>
                                           </tr>
                                           <tr>
                                              <td>Home Dir</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>/root</td>
                                           </tr>
                                           <tr>
                                              <td>Login Shell</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>/bin/bash</td>
                                           </tr>
                                           <tr>
                                              <td>Last Login</td>
                                              <td>Int</td>
                                              <td>Does not exist</td>
                                              <td>No Value</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5

                CIS Controls V7.0:

                • Control 14: Controlled Access Based on the Need to Know: -- More
                  CIS Control Information
                  Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
                  Subcontrol: 14.6
                  Label: Protect Information through Access Control Lists
                  Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
                • >

                CIS Critical Security Controls V8.0:

                • Control 3: Data Protection: -- More
                  CIS Control Information
                  Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
                  Safeguard: 3.3
                  Label: Configure Data Access Control Lists
                  Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
                  Implementation Group: IG-1
                  Security Function: Protect
                • >

                Fail

                4.5.4 Ensure default user umask is 027 or more restrictive

                Description:

                The user file-creation mode mask ( umask ) is use to determine the file permission for newly created directories and files. In Linux, the default permissions for any newly created directory is 0777 (rwxrwxrwx), and for any newly created file it is 0666 (rw-rw-rw-). The umask modifies the default Linux permissions by restricting (masking) these permissions. The umask is not simply subtracted, but is processed bitwise. Bits set in the umask are cleared in the resulting file mode.

                umask can be set with either octal or Symbolic values

                • Octal (Numeric) Value - Represented by either three or four digits. ie umask 0027 or umask 027 . If a four digit umask is used, the first digit is ignored. The remaining three digits effect the resulting permissions for user, group, and world/other respectively.
                • Symbolic Value - Represented by a comma separated list for User u , group g , and world/other o . The permissions listed are not masked by umask . ie a umask set by umask u=rwx,g=rx,o= is the Symbolic equivalent of the Octalumask 027 . This umask would set a newly created directory with file mode drwxr-x--- and a newly created file with file mode rw-r----- .

                Setting the default umask :

                • pam_umask module:
                  • will set the umask according to the system default in /etc/login.defs and user settings, solving the problem of different umask settings with different shells, display managers, remote sessions etc.
                  • umask=<mask> value in the /etc/login.defs file is interpreted as Octal
                  • Setting USERGROUPS_ENAB to yes in /etc/login.defs (default):
                    • will enable setting of the umask group bits to be the same as owner bits. (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is the same as gid, and username is the same as the primary group name
                    • userdel will remove the user's group if it contains no more members, and useradd will create by default a group with the name of the user
                • System Wide Shell Configuration File :
                  • /etc/profile - used to set system wide environmental variables on users shells. The variables are sometimes the same ones that are in the .profile , however this file is used to set an initial PATH or PS1 for all shell users of the system. is only executed for interactive login shells, or shells executed with the --login parameter
                  • /etc/profile.d - /etc/profile will execute the scripts within /etc/profile.d/*.sh . It is recommended to place your configuration in a shell script within /etc/profile.d to set your own system wide environmental variables.
                  • /etc/bash.bashrc - System wide version of .bashrc . etc/bashrc also invokes /etc/profile.d/*.sh if non-login shell, but redirects output to /dev/null if non-interactive. Is only executed for interactive shells or if BASH_ENV is set to /etc/bash.bashrc

                User Shell Configuration Files:

                • ~/.profile - Is executed to configure your shell before the initial command prompt. Is only read by login shells.
                • ~/.bashrc - Is executed for interactive shells. only read by a shell that's both interactive and non-login

                Setting a very secure default value for umask ensures that users make a conscious choice about their file permissions. A default umask setting of 077 causes files and directories created by users to not be readable by any other user on the system. A umask of 027 would make files and directories readable by users in the same Unix group, while a umask of 022 would make files readable by every user on the system.

                Run the following command and remove or modify the umask of any returned files:

                # grep -RPi '(^|^[^#]*)\s*umask\s+([0-7][0-7][01][0-7]\b|[0-7][0-7][0-7][0-6]\b|[0-7][01][0-7]\b|[0-7][0-7][0-6]\b|(u=[rwx]{0,3},)?(g=[rwx]{0,3},)?o=[rwx]+\b|(u=[rwx]{1,3},)?g=[^rx]{1,3}(,o=[rwx]{0,3})?\b)' /etc/login.defs /etc/profile* /etc/bash.bashrc*

                Follow one of the following methods to set the default user umask:

                Edit /etc/login.defs and edit the UMASK and USERGROUPS_ENAB lines as follows:

                UMASK 027



                USERGROUPS_ENAB no

                Edit /etc/pam.d/common-session and add or edit the following:

                session optional pam_umask.so

                OR

                Configure umask in one of the following files:

                • A file in the /etc/profile.d/ directory ending in .sh
                • /etc/profile
                • /etc/bash.bashrc

                Example: /etc/profile.d/set_umask.sh

                umask 027

                Note: this method only applies to bash and shell. If other shells are supported on the system, it is recommended that their configuration files also are checked.

                Impact:

                Setting USERGROUPS_ENAB no in /etc/login.defs may change the expected behavior of useradd and userdel .

                Setting USERGROUPS_ENAB yes in /etc/login.defs

                • userdel will remove the user's group if it contains no more members
                • useradd will create by default a group with the name of the user.

                Show Assessment Evidence
                Complex Check
                AND
                Complex Check
                OR
                Complex Check
                OR
                Complex Check
                OR
                Complex Check
                OR
                Complex Check
                AND
                Complex Check
                AND
                Criterion: Ensure at least one file named /etc/login.defs exists and matches pattern (?i)^\s*UMASK\s+(0[0-7][2-7]7|[0-7][2-7]7)\b
                Existence Check: At Least One Exists
                Item Check: All
                Result: Fail
                No matching system items were found.
                Criterion: Ensure at least one file named /etc/pam.d/common-session exists and matches pattern ^\s*session\s+(?:optional|requisite|required)\s+pam_umask\.so\b
                Existence Check: At Least One Exists
                Item Check: All
                Result: Pass
                Textfilecontent Item
                Name Type Status Value
                Filepath String Exists /etc/pam.d/common-session
                Path String Exists /etc/pam.d
                Filename String Exists common-session
                Pattern String Exists ^\s*session\s+(?:optional|requisite|required)\s+pam_umask\.so\b
                Instance Int Exists 1
                Line String Exists session optional pam_umask.so
                Text String Exists session optional pam_umask.so
                Subexpression String Does not exist No Value
                Windows View String Not collected No Value
                Criterion: Ensure at least one file named /etc/login.defs exists and matches pattern ^\s*(?i)USERGROUPS_ENAB\s*"?no"?\b
                Existence Check: At Least One Exists
                Item Check: All
                Result: Fail
                No matching system items were found.
                Criterion: Ensure at least one file(s) named ^.+\.sh$ in /etc/profile.d/ exists and matches pattern (?i)^\s*UMASK\s+\s*(0[0-7][2-7]7|[0-7][2-7]7|u=(r?|w?|x?)(r?|w?|x?)(r?|w?|x?),g=(r?x?|x?r?),o=)\b
                Existence Check: At Least One Exists
                Item Check: All
                Result: Fail
                No matching system items were found.
                Criterion: Ensure at least one file named /etc/profile exists and matches pattern (?i)^\s*UMASK\s+\s*(0[0-7][2-7]7|[0-7][2-7]7|u=(r?|w?|x?)(r?|w?|x?)(r?|w?|x?),g=(r?x?|x?r?),o=)\b
                Existence Check: At Least One Exists
                Item Check: All
                Result: Fail
                No matching system items were found.
                Criterion: Ensure at least one file named /etc/bash.bashrc exists and matches pattern (?i)^\s*UMASK\s+\s*(0[0-7][2-7]7|[0-7][2-7]7|u=(r?|w?|x?)(r?|w?|x?)(r?|w?|x?),g=(r?x?|x?r?),o=)\b
                Existence Check: At Least One Exists
                Item Check: All
                Result: Fail
                No matching system items were found.
                Criterion: Ensure at least one file named /etc/profile.local exists and matches pattern (?i)^\s*UMASK\s+\s*(0[0-7][2-7]7|[0-7][2-7]7|u=(r?|w?|x?)(r?|w?|x?)(r?|w?|x?),g=(r?x?|x?r?),o=)\b
                Existence Check: At Least One Exists
                Item Check: All
                Result: Fail
                No matching system items were found.
                Complex Check
                AND
                Complex Check
                AND
                Complex Check
                AND
                Complex Check
                AND
                Criterion: Ensure no file named /etc/login.defs exists and matches pattern (?i)(^\s*|^\s*[^#]+\s+)umask\s+([0-7][0-7][01][0-7]\b|[0-7][0-7][0-7][0-6]\b|[0-7][01][0-7]\b|[0-7][0-7][0-6]\b|(u=[rwx]{0,3},)?(g=[rwx]{0,3},)?o=[rwx]+\b|(u=[rwx]{1,3},)?g=[^rx]{1,3}(,o=[rwx
                Existence Check: None Exist
                Item Check: All
                Result: Fail
                Textfilecontent Item
                Name Type Status Value
                Filepath String Exists /etc/login.defs
                Path String Exists /etc
                Filename String Exists login.defs
                Pattern String Exists (?i)(^\s*|^\s*[^#]+\s+)umask\s+([0-7][0-7][01][0-7]\b|[0-7][0-7][0-7][0-6]\b|[0-7][01][0-7]\b|[0-7][0-7][0-6]\b|(u=[rwx]{0,3},)?(g=[rwx]{0,3},)?o=[rwx]+\b|(u=[rwx]{1,3},)?g=[^rx]{1,3}(,o=[rwx]{0,3})?\b)
                Instance Int Exists 1
                Line String Exists ERASECHAR 0177 KILLCHAR 025 UMASK 022
                Text String Exists ERASECHAR 0177 KILLCHAR 025 UMASK 022
                Subexpression String Exists ERASECHAR 0177 KILLCHAR 025
                Subexpression String Exists 022
                Subexpression String Does not exist No Value
                Subexpression String Does not exist No Value
                Subexpression String Does not exist No Value
                Subexpression String Does not exist No Value
                Windows View String Not collected No Value
                Criterion: Ensurefile(s) named ^.+\.sh$ in /etc/profile.d/ exists and matches pattern (?i)(^\s*|^\s*[^#]+\s+)umask\s+([0-7][0-7][01][0-7]\b|[0-7][0-7][0-7][0-6]\b|[0-7][01][0-7]\b|[0-7][0-7][0-6]\b|(u=[rwx]{0,3},)?(g=[rwx]{0,3},)?o=[rwx]+\b|(u=[rwx]{1,3},)?g=[^rx]{1
                Existence Check: None Exist
                Item Check: All
                Result: Pass
                No matching system items were found.
                Criterion: Ensure no file named /etc/profile.local exists and matches pattern (?i)(^\s*|^\s*[^#]+\s+)umask\s+([0-7][0-7][01][0-7]\b|[0-7][0-7][0-7][0-6]\b|[0-7][01][0-7]\b|[0-7][0-7][0-6]\b|(u=[rwx]{0,3},)?(g=[rwx]{0,3},)?o=[rwx]+\b|(u=[rwx]{1,3},)?g=[^rx]{1,3}(,o=[
                Existence Check: None Exist
                Item Check: All
                Result: Pass
                No matching system items were found.
                Criterion: Ensure no file named /etc/profile exists and matches pattern (?i)(^\s*|^\s*[^#]+\s+)umask\s+([0-7][0-7][01][0-7]\b|[0-7][0-7][0-7][0-6]\b|[0-7][01][0-7]\b|[0-7][0-7][0-6]\b|(u=[rwx]{0,3},)?(g=[rwx]{0,3},)?o=[rwx]+\b|(u=[rwx]{1,3},)?g=[^rx]{1,3}(,o=[rwx]{0
                Existence Check: None Exist
                Item Check: All
                Result: Pass
                No matching system items were found.
                Criterion: Ensure no file named /etc/bash.bash.rc exists and matches pattern (?i)(^\s*|^\s*[^#]+\s+)umask\s+([0-7][0-7][01][0-7]\b|[0-7][0-7][0-7][0-6]\b|[0-7][01][0-7]\b|[0-7][0-7][0-6]\b|(u=[rwx]{0,3},)?(g=[rwx]{0,3},)?o=[rwx]+\b|(u=[rwx]{1,3},)?g=[^rx]{1,3}(,o=[r
                Existence Check: None Exist
                Item Check: All
                Result: Pass
                No matching system items were found.


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_4.5.4_Ensure_default_user_umask_is_027_or_more_restrictive"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.896-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>fail</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">pam_umask(8)</xccdf:ident>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3, MP-2</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:complex-check operator="OR" negate="false">
                         <xccdf:complex-check operator="OR" negate="false">
                            <xccdf:complex-check operator="OR" negate="false">
                               <xccdf:complex-check operator="OR" negate="false">
                                  <xccdf:complex-check operator="AND" negate="false">
                                     <xccdf:complex-check operator="AND" negate="false">
                                        <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                                     negate="false"
                                                     multi-check="false">
                                           <xccdf:check-content-ref href="#OVAL-Results-1"
                                                                    name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995412"/>
                                           <evidence xmlns="http://cisecurity.org/evidence">
                                              <div class="definition"
                                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995412">
                                                 <div class="criteria">
                                                    <div class="criterion"
                                                         id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995412"
                                                         check="all"
                                                         check_existence="at_least_one_exists">
                                                       <table class="evidence-sep" width="100%">
                                                          <tbody class="tbe">
                                                             <tr>
                                                                <td class="bold">Criterion:</td>
                                                                <td>Ensure at least one file named /etc/login.defs exists and matches pattern (?i)^\s*UMASK\s+(0[0-7][2-7]7|[0-7][2-7]7)\b</td>
                                                             </tr>
                                                             <tr>
                                                                <td class="bold">Existence Check:</td>
                                                                <td>At Least One Exists</td>
                                                             </tr>
                                                             <tr>
                                                                <td class="bold">Item Check:</td>
                                                                <td>All</td>
                                                             </tr>
                                                             <tr>
                                                                <td class="bold">Result:</td>
                                                                <td class="fail">Fail</td>
                                                             </tr>
                                                          </tbody>
                                                       </table>
                                                       <table class="evidence" width="100%">
                                                          <tr>
                                                             <td>No matching system items were found.</td>
                                                          </tr>
                                                       </table>
                                                    </div>
                                                 </div>
                                              </div>
                                           </evidence>
                                        </xccdf:check>
                                        <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                                     negate="false"
                                                     multi-check="false">
                                           <xccdf:check-content-ref href="#OVAL-Results-1"
                                                                    name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995413"/>
                                           <evidence xmlns="http://cisecurity.org/evidence">
                                              <div class="definition"
                                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995413">
                                                 <div class="criteria">
                                                    <div class="criterion"
                                                         id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995413"
                                                         check="all"
                                                         check_existence="at_least_one_exists">
                                                       <table class="evidence-sep" width="100%">
                                                          <tbody class="tbe">
                                                             <tr>
                                                                <td class="bold">Criterion:</td>
                                                                <td>Ensure at least one file named /etc/pam.d/common-session exists and matches pattern ^\s*session\s+(?:optional|requisite|required)\s+pam_umask\.so\b</td>
                                                             </tr>
                                                             <tr>
                                                                <td class="bold">Existence Check:</td>
                                                                <td>At Least One Exists</td>
                                                             </tr>
                                                             <tr>
                                                                <td class="bold">Item Check:</td>
                                                                <td>All</td>
                                                             </tr>
                                                             <tr>
                                                                <td class="bold">Result:</td>
                                                                <td class="pass">Pass</td>
                                                             </tr>
                                                          </tbody>
                                                       </table>
                                                       <table class="evidence" width="100%">
                                                          <caption>Textfilecontent Item</caption>
                                                          <thead>
                                                             <tr>
                                                                <th scope="col">Name</th>
                                                                <th scope="col">Type</th>
                                                                <th scope="col">Status</th>
                                                                <th scope="col">Value</th>
                                                             </tr>
                                                          </thead>
                                                          <tbody class="tbe">
                                                             <tr>
                                                                <td>Filepath</td>
                                                                <td>String</td>
                                                                <td>Exists</td>
                                                                <td>/etc/pam.d/common-session</td>
                                                             </tr>
                                                             <tr>
                                                                <td>Path</td>
                                                                <td>String</td>
                                                                <td>Exists</td>
                                                                <td>/etc/pam.d</td>
                                                             </tr>
                                                             <tr>
                                                                <td>Filename</td>
                                                                <td>String</td>
                                                                <td>Exists</td>
                                                                <td>common-session</td>
                                                             </tr>
                                                             <tr>
                                                                <td>Pattern</td>
                                                                <td>String</td>
                                                                <td>Exists</td>
                                                                <td>^\s*session\s+(?:optional|requisite|required)\s+pam_umask\.so\b</td>
                                                             </tr>
                                                             <tr>
                                                                <td>Instance</td>
                                                                <td>Int</td>
                                                                <td>Exists</td>
                                                                <td>1</td>
                                                             </tr>
                                                             <tr>
                                                                <td>Line</td>
                                                                <td>String</td>
                                                                <td>Exists</td>
                                                                <td>session optional			pam_umask.so</td>
                                                             </tr>
                                                             <tr>
                                                                <td>Text</td>
                                                                <td>String</td>
                                                                <td>Exists</td>
                                                                <td>session optional			pam_umask.so</td>
                                                             </tr>
                                                             <tr>
                                                                <td>Subexpression</td>
                                                                <td>String</td>
                                                                <td>Does not exist</td>
                                                                <td>No Value</td>
                                                             </tr>
                                                             <tr>
                                                                <td>Windows View</td>
                                                                <td>String</td>
                                                                <td>Not collected</td>
                                                                <td>No Value</td>
                                                             </tr>
                                                          </tbody>
                                                       </table>
                                                    </div>
                                                 </div>
                                              </div>
                                           </evidence>
                                        </xccdf:check>
                                     </xccdf:complex-check>
                                     <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                                  negate="false"
                                                  multi-check="false">
                                        <xccdf:check-content-ref href="#OVAL-Results-1"
                                                                 name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995423"/>
                                        <evidence xmlns="http://cisecurity.org/evidence">
                                           <div class="definition"
                                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995423">
                                              <div class="criteria">
                                                 <div class="criterion"
                                                      id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995423"
                                                      check="all"
                                                      check_existence="at_least_one_exists">
                                                    <table class="evidence-sep" width="100%">
                                                       <tbody class="tbe">
                                                          <tr>
                                                             <td class="bold">Criterion:</td>
                                                             <td>Ensure at least one file named /etc/login.defs exists and matches pattern ^\s*(?i)USERGROUPS_ENAB\s*"?no"?\b</td>
                                                          </tr>
                                                          <tr>
                                                             <td class="bold">Existence Check:</td>
                                                             <td>At Least One Exists</td>
                                                          </tr>
                                                          <tr>
                                                             <td class="bold">Item Check:</td>
                                                             <td>All</td>
                                                          </tr>
                                                          <tr>
                                                             <td class="bold">Result:</td>
                                                             <td class="fail">Fail</td>
                                                          </tr>
                                                       </tbody>
                                                    </table>
                                                    <table class="evidence" width="100%">
                                                       <tr>
                                                          <td>No matching system items were found.</td>
                                                       </tr>
                                                    </table>
                                                 </div>
                                              </div>
                                           </div>
                                        </evidence>
                                     </xccdf:check>
                                  </xccdf:complex-check>
                                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                               negate="false"
                                               multi-check="false">
                                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995414"/>
                                     <evidence xmlns="http://cisecurity.org/evidence">
                                        <div class="definition"
                                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995414">
                                           <div class="criteria">
                                              <div class="criterion"
                                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995414"
                                                   check="all"
                                                   check_existence="at_least_one_exists">
                                                 <table class="evidence-sep" width="100%">
                                                    <tbody class="tbe">
                                                       <tr>
                                                          <td class="bold">Criterion:</td>
                                                          <td>Ensure at least one file(s) named ^.+\.sh$ in /etc/profile.d/ exists and matches pattern (?i)^\s*UMASK\s+\s*(0[0-7][2-7]7|[0-7][2-7]7|u=(r?|w?|x?)(r?|w?|x?)(r?|w?|x?),g=(r?x?|x?r?),o=)\b</td>
                                                       </tr>
                                                       <tr>
                                                          <td class="bold">Existence Check:</td>
                                                          <td>At Least One Exists</td>
                                                       </tr>
                                                       <tr>
                                                          <td class="bold">Item Check:</td>
                                                          <td>All</td>
                                                       </tr>
                                                       <tr>
                                                          <td class="bold">Result:</td>
                                                          <td class="fail">Fail</td>
                                                       </tr>
                                                    </tbody>
                                                 </table>
                                                 <table class="evidence" width="100%">
                                                    <tr>
                                                       <td>No matching system items were found.</td>
                                                    </tr>
                                                 </table>
                                              </div>
                                           </div>
                                        </div>
                                     </evidence>
                                  </xccdf:check>
                               </xccdf:complex-check>
                               <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                            negate="false"
                                            multi-check="false">
                                  <xccdf:check-content-ref href="#OVAL-Results-1"
                                                           name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995415"/>
                                  <evidence xmlns="http://cisecurity.org/evidence">
                                     <div class="definition"
                                          id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995415">
                                        <div class="criteria">
                                           <div class="criterion"
                                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995415"
                                                check="all"
                                                check_existence="at_least_one_exists">
                                              <table class="evidence-sep" width="100%">
                                                 <tbody class="tbe">
                                                    <tr>
                                                       <td class="bold">Criterion:</td>
                                                       <td>Ensure at least one file named /etc/profile exists and matches pattern (?i)^\s*UMASK\s+\s*(0[0-7][2-7]7|[0-7][2-7]7|u=(r?|w?|x?)(r?|w?|x?)(r?|w?|x?),g=(r?x?|x?r?),o=)\b</td>
                                                    </tr>
                                                    <tr>
                                                       <td class="bold">Existence Check:</td>
                                                       <td>At Least One Exists</td>
                                                    </tr>
                                                    <tr>
                                                       <td class="bold">Item Check:</td>
                                                       <td>All</td>
                                                    </tr>
                                                    <tr>
                                                       <td class="bold">Result:</td>
                                                       <td class="fail">Fail</td>
                                                    </tr>
                                                 </tbody>
                                              </table>
                                              <table class="evidence" width="100%">
                                                 <tr>
                                                    <td>No matching system items were found.</td>
                                                 </tr>
                                              </table>
                                           </div>
                                        </div>
                                     </div>
                                  </evidence>
                               </xccdf:check>
                            </xccdf:complex-check>
                            <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                         negate="false"
                                         multi-check="false">
                               <xccdf:check-content-ref href="#OVAL-Results-1"
                                                        name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995416"/>
                               <evidence xmlns="http://cisecurity.org/evidence">
                                  <div class="definition"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995416">
                                     <div class="criteria">
                                        <div class="criterion"
                                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995416"
                                             check="all"
                                             check_existence="at_least_one_exists">
                                           <table class="evidence-sep" width="100%">
                                              <tbody class="tbe">
                                                 <tr>
                                                    <td class="bold">Criterion:</td>
                                                    <td>Ensure at least one file named /etc/bash.bashrc exists and matches pattern (?i)^\s*UMASK\s+\s*(0[0-7][2-7]7|[0-7][2-7]7|u=(r?|w?|x?)(r?|w?|x?)(r?|w?|x?),g=(r?x?|x?r?),o=)\b</td>
                                                 </tr>
                                                 <tr>
                                                    <td class="bold">Existence Check:</td>
                                                    <td>At Least One Exists</td>
                                                 </tr>
                                                 <tr>
                                                    <td class="bold">Item Check:</td>
                                                    <td>All</td>
                                                 </tr>
                                                 <tr>
                                                    <td class="bold">Result:</td>
                                                    <td class="fail">Fail</td>
                                                 </tr>
                                              </tbody>
                                           </table>
                                           <table class="evidence" width="100%">
                                              <tr>
                                                 <td>No matching system items were found.</td>
                                              </tr>
                                           </table>
                                        </div>
                                     </div>
                                  </div>
                               </evidence>
                            </xccdf:check>
                         </xccdf:complex-check>
                         <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                      negate="false"
                                      multi-check="false">
                            <xccdf:check-content-ref href="#OVAL-Results-1"
                                                     name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995417"/>
                            <evidence xmlns="http://cisecurity.org/evidence">
                               <div class="definition"
                                    id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995417">
                                  <div class="criteria">
                                     <div class="criterion"
                                          id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995417"
                                          check="all"
                                          check_existence="at_least_one_exists">
                                        <table class="evidence-sep" width="100%">
                                           <tbody class="tbe">
                                              <tr>
                                                 <td class="bold">Criterion:</td>
                                                 <td>Ensure at least one file named /etc/profile.local exists and matches pattern (?i)^\s*UMASK\s+\s*(0[0-7][2-7]7|[0-7][2-7]7|u=(r?|w?|x?)(r?|w?|x?)(r?|w?|x?),g=(r?x?|x?r?),o=)\b</td>
                                              </tr>
                                              <tr>
                                                 <td class="bold">Existence Check:</td>
                                                 <td>At Least One Exists</td>
                                              </tr>
                                              <tr>
                                                 <td class="bold">Item Check:</td>
                                                 <td>All</td>
                                              </tr>
                                              <tr>
                                                 <td class="bold">Result:</td>
                                                 <td class="fail">Fail</td>
                                              </tr>
                                           </tbody>
                                        </table>
                                        <table class="evidence" width="100%">
                                           <tr>
                                              <td>No matching system items were found.</td>
                                           </tr>
                                        </table>
                                     </div>
                                  </div>
                               </div>
                            </evidence>
                         </xccdf:check>
                      </xccdf:complex-check>
                      <xccdf:complex-check operator="AND" negate="false">
                         <xccdf:complex-check operator="AND" negate="false">
                            <xccdf:complex-check operator="AND" negate="false">
                               <xccdf:complex-check operator="AND" negate="false">
                                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                               negate="false"
                                               multi-check="false">
                                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995418"/>
                                     <evidence xmlns="http://cisecurity.org/evidence">
                                        <div class="definition"
                                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995418">
                                           <div class="criteria">
                                              <div class="criterion"
                                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995418"
                                                   check="all"
                                                   check_existence="none_exist">
                                                 <table class="evidence-sep" width="100%">
                                                    <tbody class="tbe">
                                                       <tr>
                                                          <td class="bold">Criterion:</td>
                                                          <td>Ensure no file named /etc/login.defs exists and matches pattern (?i)(^\s*|^\s*[^#]+\s+)umask\s+([0-7][0-7][01][0-7]\b|[0-7][0-7][0-7][0-6]\b|[0-7][01][0-7]\b|[0-7][0-7][0-6]\b|(u=[rwx]{0,3},)?(g=[rwx]{0,3},)?o=[rwx]+\b|(u=[rwx]{1,3},)?g=[^rx]{1,3}(,o=[rwx</td>
                                                       </tr>
                                                       <tr>
                                                          <td class="bold">Existence Check:</td>
                                                          <td>None Exist</td>
                                                       </tr>
                                                       <tr>
                                                          <td class="bold">Item Check:</td>
                                                          <td>All</td>
                                                       </tr>
                                                       <tr>
                                                          <td class="bold">Result:</td>
                                                          <td class="fail">Fail</td>
                                                       </tr>
                                                    </tbody>
                                                 </table>
                                                 <table class="evidence" width="100%">
                                                    <caption>Textfilecontent Item</caption>
                                                    <thead>
                                                       <tr>
                                                          <th scope="col">Name</th>
                                                          <th scope="col">Type</th>
                                                          <th scope="col">Status</th>
                                                          <th scope="col">Value</th>
                                                       </tr>
                                                    </thead>
                                                    <tbody class="tbe">
                                                       <tr>
                                                          <td>Filepath</td>
                                                          <td>String</td>
                                                          <td>Exists</td>
                                                          <td>/etc/login.defs</td>
                                                       </tr>
                                                       <tr>
                                                          <td>Path</td>
                                                          <td>String</td>
                                                          <td>Exists</td>
                                                          <td>/etc</td>
                                                       </tr>
                                                       <tr>
                                                          <td>Filename</td>
                                                          <td>String</td>
                                                          <td>Exists</td>
                                                          <td>login.defs</td>
                                                       </tr>
                                                       <tr>
                                                          <td>Pattern</td>
                                                          <td>String</td>
                                                          <td>Exists</td>
                                                          <td>(?i)(^\s*|^\s*[^#]+\s+)umask\s+([0-7][0-7][01][0-7]\b|[0-7][0-7][0-7][0-6]\b|[0-7][01][0-7]\b|[0-7][0-7][0-6]\b|(u=[rwx]{0,3},)?(g=[rwx]{0,3},)?o=[rwx]+\b|(u=[rwx]{1,3},)?g=[^rx]{1,3}(,o=[rwx]{0,3})?\b)</td>
                                                       </tr>
                                                       <tr>
                                                          <td>Instance</td>
                                                          <td>Int</td>
                                                          <td>Exists</td>
                                                          <td>1</td>
                                                       </tr>
                                                       <tr>
                                                          <td>Line</td>
                                                          <td>String</td>
                                                          <td>Exists</td>
                                                          <td>ERASECHAR	0177
                KILLCHAR	025
                UMASK		022</td>
                                                       </tr>
                                                       <tr>
                                                          <td>Text</td>
                                                          <td>String</td>
                                                          <td>Exists</td>
                                                          <td>ERASECHAR	0177
                KILLCHAR	025
                UMASK		022</td>
                                                       </tr>
                                                       <tr>
                                                          <td>Subexpression</td>
                                                          <td>String</td>
                                                          <td>Exists</td>
                                                          <td>ERASECHAR	0177
                KILLCHAR	025
                </td>
                                                       </tr>
                                                       <tr>
                                                          <td>Subexpression</td>
                                                          <td>String</td>
                                                          <td>Exists</td>
                                                          <td>022</td>
                                                       </tr>
                                                       <tr>
                                                          <td>Subexpression</td>
                                                          <td>String</td>
                                                          <td>Does not exist</td>
                                                          <td>No Value</td>
                                                       </tr>
                                                       <tr>
                                                          <td>Subexpression</td>
                                                          <td>String</td>
                                                          <td>Does not exist</td>
                                                          <td>No Value</td>
                                                       </tr>
                                                       <tr>
                                                          <td>Subexpression</td>
                                                          <td>String</td>
                                                          <td>Does not exist</td>
                                                          <td>No Value</td>
                                                       </tr>
                                                       <tr>
                                                          <td>Subexpression</td>
                                                          <td>String</td>
                                                          <td>Does not exist</td>
                                                          <td>No Value</td>
                                                       </tr>
                                                       <tr>
                                                          <td>Windows View</td>
                                                          <td>String</td>
                                                          <td>Not collected</td>
                                                          <td>No Value</td>
                                                       </tr>
                                                    </tbody>
                                                 </table>
                                              </div>
                                           </div>
                                        </div>
                                     </evidence>
                                  </xccdf:check>
                                  <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                               negate="false"
                                               multi-check="false">
                                     <xccdf:check-content-ref href="#OVAL-Results-1"
                                                              name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995419"/>
                                     <evidence xmlns="http://cisecurity.org/evidence">
                                        <div class="definition"
                                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995419">
                                           <div class="criteria">
                                              <div class="criterion"
                                                   id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995419"
                                                   check="all"
                                                   check_existence="none_exist">
                                                 <table class="evidence-sep" width="100%">
                                                    <tbody class="tbe">
                                                       <tr>
                                                          <td class="bold">Criterion:</td>
                                                          <td>Ensurefile(s) named ^.+\.sh$ in /etc/profile.d/ exists and matches pattern (?i)(^\s*|^\s*[^#]+\s+)umask\s+([0-7][0-7][01][0-7]\b|[0-7][0-7][0-7][0-6]\b|[0-7][01][0-7]\b|[0-7][0-7][0-6]\b|(u=[rwx]{0,3},)?(g=[rwx]{0,3},)?o=[rwx]+\b|(u=[rwx]{1,3},)?g=[^rx]{1</td>
                                                       </tr>
                                                       <tr>
                                                          <td class="bold">Existence Check:</td>
                                                          <td>None Exist</td>
                                                       </tr>
                                                       <tr>
                                                          <td class="bold">Item Check:</td>
                                                          <td>All</td>
                                                       </tr>
                                                       <tr>
                                                          <td class="bold">Result:</td>
                                                          <td class="pass">Pass</td>
                                                       </tr>
                                                    </tbody>
                                                 </table>
                                                 <table class="evidence" width="100%">
                                                    <tr>
                                                       <td>No matching system items were found.</td>
                                                    </tr>
                                                 </table>
                                              </div>
                                           </div>
                                        </div>
                                     </evidence>
                                  </xccdf:check>
                               </xccdf:complex-check>
                               <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                            negate="false"
                                            multi-check="false">
                                  <xccdf:check-content-ref href="#OVAL-Results-1"
                                                           name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995420"/>
                                  <evidence xmlns="http://cisecurity.org/evidence">
                                     <div class="definition"
                                          id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995420">
                                        <div class="criteria">
                                           <div class="criterion"
                                                id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995420"
                                                check="all"
                                                check_existence="none_exist">
                                              <table class="evidence-sep" width="100%">
                                                 <tbody class="tbe">
                                                    <tr>
                                                       <td class="bold">Criterion:</td>
                                                       <td>Ensure no file named /etc/profile.local exists and matches pattern (?i)(^\s*|^\s*[^#]+\s+)umask\s+([0-7][0-7][01][0-7]\b|[0-7][0-7][0-7][0-6]\b|[0-7][01][0-7]\b|[0-7][0-7][0-6]\b|(u=[rwx]{0,3},)?(g=[rwx]{0,3},)?o=[rwx]+\b|(u=[rwx]{1,3},)?g=[^rx]{1,3}(,o=[</td>
                                                    </tr>
                                                    <tr>
                                                       <td class="bold">Existence Check:</td>
                                                       <td>None Exist</td>
                                                    </tr>
                                                    <tr>
                                                       <td class="bold">Item Check:</td>
                                                       <td>All</td>
                                                    </tr>
                                                    <tr>
                                                       <td class="bold">Result:</td>
                                                       <td class="pass">Pass</td>
                                                    </tr>
                                                 </tbody>
                                              </table>
                                              <table class="evidence" width="100%">
                                                 <tr>
                                                    <td>No matching system items were found.</td>
                                                 </tr>
                                              </table>
                                           </div>
                                        </div>
                                     </div>
                                  </evidence>
                               </xccdf:check>
                            </xccdf:complex-check>
                            <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                         negate="false"
                                         multi-check="false">
                               <xccdf:check-content-ref href="#OVAL-Results-1"
                                                        name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995421"/>
                               <evidence xmlns="http://cisecurity.org/evidence">
                                  <div class="definition"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995421">
                                     <div class="criteria">
                                        <div class="criterion"
                                             id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995421"
                                             check="all"
                                             check_existence="none_exist">
                                           <table class="evidence-sep" width="100%">
                                              <tbody class="tbe">
                                                 <tr>
                                                    <td class="bold">Criterion:</td>
                                                    <td>Ensure no file named /etc/profile exists and matches pattern (?i)(^\s*|^\s*[^#]+\s+)umask\s+([0-7][0-7][01][0-7]\b|[0-7][0-7][0-7][0-6]\b|[0-7][01][0-7]\b|[0-7][0-7][0-6]\b|(u=[rwx]{0,3},)?(g=[rwx]{0,3},)?o=[rwx]+\b|(u=[rwx]{1,3},)?g=[^rx]{1,3}(,o=[rwx]{0</td>
                                                 </tr>
                                                 <tr>
                                                    <td class="bold">Existence Check:</td>
                                                    <td>None Exist</td>
                                                 </tr>
                                                 <tr>
                                                    <td class="bold">Item Check:</td>
                                                    <td>All</td>
                                                 </tr>
                                                 <tr>
                                                    <td class="bold">Result:</td>
                                                    <td class="pass">Pass</td>
                                                 </tr>
                                              </tbody>
                                           </table>
                                           <table class="evidence" width="100%">
                                              <tr>
                                                 <td>No matching system items were found.</td>
                                              </tr>
                                           </table>
                                        </div>
                                     </div>
                                  </div>
                               </evidence>
                            </xccdf:check>
                         </xccdf:complex-check>
                         <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                      negate="false"
                                      multi-check="false">
                            <xccdf:check-content-ref href="#OVAL-Results-1"
                                                     name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995422"/>
                            <evidence xmlns="http://cisecurity.org/evidence">
                               <div class="definition"
                                    id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995422">
                                  <div class="criteria">
                                     <div class="criterion"
                                          id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995422"
                                          check="all"
                                          check_existence="none_exist">
                                        <table class="evidence-sep" width="100%">
                                           <tbody class="tbe">
                                              <tr>
                                                 <td class="bold">Criterion:</td>
                                                 <td>Ensure no file named /etc/bash.bash.rc exists and matches pattern (?i)(^\s*|^\s*[^#]+\s+)umask\s+([0-7][0-7][01][0-7]\b|[0-7][0-7][0-7][0-6]\b|[0-7][01][0-7]\b|[0-7][0-7][0-6]\b|(u=[rwx]{0,3},)?(g=[rwx]{0,3},)?o=[rwx]+\b|(u=[rwx]{1,3},)?g=[^rx]{1,3}(,o=[r</td>
                                              </tr>
                                              <tr>
                                                 <td class="bold">Existence Check:</td>
                                                 <td>None Exist</td>
                                              </tr>
                                              <tr>
                                                 <td class="bold">Item Check:</td>
                                                 <td>All</td>
                                              </tr>
                                              <tr>
                                                 <td class="bold">Result:</td>
                                                 <td class="pass">Pass</td>
                                              </tr>
                                           </tbody>
                                        </table>
                                        <table class="evidence" width="100%">
                                           <tr>
                                              <td>No matching system items were found.</td>
                                           </tr>
                                        </table>
                                     </div>
                                  </div>
                               </div>
                            </evidence>
                         </xccdf:check>
                      </xccdf:complex-check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: pam_umask(8)
                • URL: NIST SP 800-53 Rev. 5: AC-3, MP-2

                CIS Controls V7.0:

                • Control 14: Controlled Access Based on the Need to Know: -- More
                  CIS Control Information
                  Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
                  Subcontrol: 14.6
                  Label: Protect Information through Access Control Lists
                  Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
                • >

                CIS Critical Security Controls V8.0:

                • Control 3: Data Protection: -- More
                  CIS Control Information
                  Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
                  Safeguard: 3.3
                  Label: Configure Data Access Control Lists
                  Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
                  Implementation Group: IG-1
                  Security Function: Protect
                • >

                Fail

                4.5.5 Ensure default user shell timeout is configured

                Description:

                TMOUT is an environmental setting that determines the timeout of a shell in seconds.

                • TMOUT= n - Sets the shell timeout to n seconds. A setting of TMOUT=0 disables timeout.
                • readonly TMOUT- Sets the TMOUT environmental variable as readonly, preventing unwanted modification during run-time.
                • export TMOUT - exports the TMOUT variable

                System Wide Shell Configuration Files:

                • /etc/profile - used to set system wide environmental variables on users shells. The variables are sometimes the same ones that are in the .bash_profile , however this file is used to set an initial PATH or PS1 for all shell users of the system. Is only executed for interactive login shells, or shells executed with the --login parameter.
                • /etc/profile.d - /etc/profile will execute the scripts within /etc/profile.d/*.sh . It is recommended to place your configuration in a shell script within /etc/profile.d to set your own system wide environmental variables.
                • /etc/bash.bashrc - System wide version of bash.bashrc . etc/bash.bashrc also invokes /etc/profile.d/*.sh if non-login shell, but redirects output to /dev/null if non-interactive. Is only executed for interactive shells or if BASH_ENV is set to /etc/bash.bashrc .

                Setting a timeout value reduces the window of opportunity for unauthorized user access to another user's shell session that has been left unattended. It also ends the inactive session and releases the resources associated with that session.

                Review /etc/bash.bashrc , /etc/profile , and all files ending in *.sh in the /etc/profile.d/ directory and remove or edit all TMOUT=_n_ entries to follow local site policy.

                TMOUT should:

                • Be configured once, as multiple lines, or a single line, in one and only one of the following locations:
                  • A file in the /etc/profile.d/ directory ending in .sh
                  • /etc/profile
                  • /etc/bash.bashrc
                • Not exceed 900
                • Not be equal to 0

                Multiple line example:

                TMOUT=900

                readonly TMOUT

                export TMOUT

                Single line example:

                readonly TMOUT=900 ; export TMOUT

                Show Assessment Evidence
                Complex Check
                AND
                Script: sce/tmout_chk.sh
                Result: Fail
                Exit Value: 102
                Output:
                • - Audit Result:
                • ** FAIL **
                • - * Reasons for audit failure * :
                • - TMOUT is not set
                No error lines were collected.


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_4.5.5_Ensure_default_user_shell_timeout_is_configured"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.896-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>fail</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/16/subcontrol/11"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-11</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://open-scap.org/page/SCE"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="sce/tmout_chk.sh"/>
                         <xccdf:check-content>
                            <command_result href="sce/tmout_chk.sh"
                                            xccdf="fail"
                                            script="/root/Assessor/sce/tmout_chk.sh"
                                            exit-value="102">
                               <out>
                                  <l/>
                                  <l>- Audit Result:</l>
                                  <l>  ** FAIL **</l>
                                  <l> - * Reasons for audit failure * :</l>
                                  <l/>
                                  <l> - TMOUT is not set</l>
                               </out>
                               <err/>
                               <env/>
                            </command_result>
                         </xccdf:check-content>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="sce">
                               <table class="evidence-sep" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td class="bold">Script:</td>
                                        <td>sce/tmout_chk.sh</td>
                                     </tr>
                                     <tr>
                                        <td class="bold">Result:</td>
                                        <td class="fail">Fail</td>
                                     </tr>
                                     <tr>
                                        <td class="bold">Exit Value:</td>
                                        <td>102</td>
                                     </tr>
                                  </tbody>
                               </table>
                               <table class="evidence" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td class="bold">Output:</td>
                                        <td>
                                           <ul class="unstyled">
                                              <li/>
                                              <li>- Audit Result:</li>
                                              <li>  ** FAIL **</li>
                                              <li> - * Reasons for audit failure * :</li>
                                              <li/>
                                              <li> - TMOUT is not set</li>
                                           </ul>
                                        </td>
                                     </tr>
                                  </tbody>
                               </table>
                               <table class="evidence" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td>No error lines were collected.</td>
                                     </tr>
                                  </tbody>
                               </table>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: AC-11

                CIS Controls V7.0:

                • Control 16: Account Monitoring and Control: -- More
                  CIS Control Information
                  Control: Actively manage the life cycle of system and application accounts - their creation, use, dormancy, deletion - in order to minimize opportunities for attackers to leverage them.
                  Subcontrol: 16.11
                  Label: Lock Workstation Sessions After Inactivity
                  Description: Automatically lock workstation sessions after a standard period of inactivity.
                • >

                CIS Critical Security Controls V8.0:

                • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
                  CIS Control Information
                  Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
                  Safeguard: 4.3
                  Label: Configure Automatic Session Locking on Enterprise Assets
                  Description: Configure automatic session locking on enterprise assets after a defined period of inactivity. For general purpose operating systems, the period must not exceed 15 minutes. For mobile end-user devices, the period must not exceed 2 minutes.
                  Implementation Group: IG-1
                  Security Function: Protect
                • >

                Fail

                4.5.7 Ensure maximum number of same consecutive characters in a password is configured

                Description:

                The pwqualitymaxrepeat option sets the maximum number of allowed same consecutive characters in a new password.

                Use of a complex password helps to increase the time and resources required to compromise the password. Password complexity, or strength, is a measure of the effectiveness of a password in resisting attempts at guessing and brute-force attacks.

                Password complexity is one factor of several that determines how long it takes to crack a password. The more complex the password, the greater the number of possible combinations that need to be tested before the password is compromised.

                Edit or add the following line in /etc/security/pwquality.conf to a value of 3 or less and not 0 :

                maxrepeat = 3

                Show Assessment Evidence
                Complex Check
                AND
                Criterion: Ensure at least one file named /etc/security/pwquality.conf exists and matches pattern (?i)^\h*maxrepeat\h*=\h*[1-3]\b
                Existence Check: At Least One Exists
                Item Check: All
                Result: Fail
                No matching system items were found.


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_4.5.7_Ensure_maximum_number_of_same_consecutive_characters_in_a_password_is_configured"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.896-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>fail</xccdf:result>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/5/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/4/subcontrol/4"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: IA-5</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995426"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995426">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995426"
                                       check="all"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure at least one file named /etc/security/pwquality.conf exists and matches pattern (?i)^\h*maxrepeat\h*=\h*[1-3]\b</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="fail">Fail</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <tr>
                                           <td>No matching system items were found.</td>
                                        </tr>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: IA-5

                CIS Controls V7.0:

                • Control 4: Controlled Use of Administrative Privileges: -- More
                  CIS Control Information
                  Control: The processes and tools used to track/control/prevent/correct the use, assignment, and configuration of administrative privileges on computers, networks, and applications.
                  Subcontrol: 4.4
                  Label: Use Unique Passwords
                  Description: Where multi-factor authentication is not supported (such as local administrator, root, or service accounts), accounts will use passwords that are unique to that system.
                • >

                CIS Critical Security Controls V8.0:

                • Control 5: Account Management: -- More
                  CIS Control Information
                  Control: Use processes and tools to assign and manage authorization to credentials for user accounts, including administrator accounts, as well as service accounts, to enterprise assets and software.
                  Safeguard: 5.2
                  Label: Use Unique Passwords
                  Description: Use unique passwords for all enterprise assets. Best practice implementation includes, at a minimum, an 8-character password for accounts using MFA and a 14-character password for accounts not using MFA.
                  Implementation Group: IG-1
                  Security Function: Protect
                • >

                5 Logging and Auditing

                The items in this section describe how to configure logging, log monitoring, and auditing, using tools included in most distributions.

                It is recommended that rsyslog be used for logging (with logwatch providing summarization) and auditd be used for auditing (with aureport providing summarization) to automatically monitor logs for intrusion attempts and other suspicious system behavior.

                In addition to the local log files created by the steps in this section, it is also recommended that sites collect copies of their system logs on a secure, centralized log server via an encrypted connection. Not only does centralized logging help sites correlate events that may be occurring on multiple systems, but having a second copy of the system log information may be critical after a system compromise where the attacker has modified the local log files on the affected system(s). If a log correlation system is deployed, configure it to process the logs described in this section.

                Because it is often necessary to correlate log information from many different systems (particularly after a security incident) it is recommended that the time be synchronized among systems and devices connected to the local network.

                It is important that all logs described in this section be monitored on a regular basis and correlated to determine trends. A seemingly innocuous entry in one log could be more significant when compared to an entry in another log.

                Note on log file permissions: There really isn't a "one size fits all" solution to the permissions on log files. Many sites utilize group permissions so that administrators who are in a defined security group, such as "wheel" do not have to elevate privileges to root in order to read log files. Also, if a third party log aggregation tool is used, it may need to have group permissions to read the log files, which is preferable to having it run setuid to root. Therefore, there are two remediation and audit steps for log file permissions. One is for systems that do not have a secured group method implemented that only permits root to read the log files ( root:root 600 ). The other is for sites that do have such a setup and are designated as root:securegrp 640 where securegrp is the defined security group (in some cases wheel ).

                5.1 Configure Logging

                Logging services should be configured to prevent information leaks and to aggregate logs on a remote server so that they can be reviewed in the event of a system compromise. A centralized log server provides a single point of entry for further analysis, monitoring and filtering.

                Security principals for logging

                • Ensure transport layer security is implemented between the client and the log server.
                • Ensure that logs are rotated as per the environment requirements.
                • Ensure all locally generated logs have the appropriate permissions.
                • Ensure all security logs are sent to a remote log server.
                • Ensure the required events are logged.

                What is covered

                This section will cover the minimum best practices for the usage of eitherrsyslogorjournald . The recommendations are written such that each is wholly independent of each other and only one is implemented .

                • If your organization makes use of an enterprise wide logging system completely outside of rsyslog or journald , then the following recommendations does not directly apply. However, the principals of the recommendations should be followed regardless of what solution is implemented. If the enterprise solution incorporates either of these tools, careful consideration should be given to the following recommendations to determine exactly what applies.
                • Should your organization make use of both rsyslog and journald , take care how the recommendations may or may not apply to you.

                What is not covered

                • Enterprise logging systems not utilizing rsyslog or journald . As logging is very situational and dependant on the local environment, not everything can be covered here.
                • Transport layer security should be applied to all remote logging functionality. Both rsyslog and journald supports secure transport and should be configured as such.
                • The log server. There are a multitude of reasons for a centralized log server (and keeping a short period logging on the local system), but the log server is out of scope for these recommendations.

                5.1.1 Configure journald

                Included in the systemd suite is a journaling service called systemd-journald.service for the collection and storage of logging data. It creates and maintains structured, indexed journals based on logging information that is received from a variety of sources such as:

                • Classic RFC3164 BSD syslog via the /dev/log socket
                • STDOUT/STDERR of programs via StandardOutput=journal + StandardError=journal in service files (both of which are default settings)
                • Kernel log messages via the /dev/kmsg device node
                • Audit records via the kernel’s audit subsystem
                • Structured log messages via journald’s native protocol

                Any changes made to the systemd-journald configuration will require a re-start of systemd-journald

                5.1.1.1 Ensure journald is configured to send logs to a remote log host

                Fail

                5.1.1.1.1 Ensure systemd-journal-remote is installed

                Description:

                Journald (via systemd-journal-remote ) supports the ability to send log events it gathers to a remote log host or to receive messages from remote hosts, thus enabling centralised log management.

                Storing log data on a remote host protects log integrity from local attacks. If an attacker gains root access on the local system, they could tamper with or remove log data that is stored on the local system.

                Run the following command to install systemd-journal-remote :

                # apt install systemd-journal-remote

                Show Assessment Evidence
                Complex Check
                OR
                Criterion: Ensure package name equals 'systemd-journal-remote' is installed
                Existence Check: At Least One Exists
                Item Check: All
                Result: Fail
                No matching system items were found.
                Criterion: Ensure package name equals 'rsyslog' is installed
                Existence Check: At Least One Exists
                Item Check: All
                Result: Fail
                No matching system items were found.


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.1.1_Ensure_systemd-journal-remote_is_installed"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.896-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>fail</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/8/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AU-2, AU-12, SI-5</xccdf:ident>
                   <xccdf:complex-check operator="OR" negate="false">
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994914"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994914">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994914"
                                       check="all"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure package name equals 'systemd-journal-remote' is installed</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="fail">Fail</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <tr>
                                           <td>No matching system items were found.</td>
                                        </tr>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994917"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994917">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994917"
                                       check="all"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure package name equals 'rsyslog' is installed</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="fail">Fail</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <tr>
                                           <td>No matching system items were found.</td>
                                        </tr>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: AU-2, AU-12, SI-5

                CIS Controls V7.0:

                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.2
                  Label: Activate audit logging
                  Description: Ensure that local logging has been enabled on all systems and networking devices.
                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.3
                  Label: Enable Detailed Logging
                  Description: Enable system logging to include detailed information such as a event source, date, user, timestamp, source addresses, destination addresses, and other useful elements.
                • >

                CIS Critical Security Controls V8.0:

                • Control 8: Audit Log Management: -- More
                  CIS Control Information
                  Control: Collect, alert, review, and retain audit logs of events that could help detect, understand, or recover from an attack.
                  Safeguard: 8.2
                  Label: Collect Audit Logs
                  Description: Collect audit logs. Ensure that logging, per the enterprise's audit log management process, has been enabled across enterprise assets.
                  Implementation Group: IG-1
                  Security Function: Detect
                • >

                Manual

                5.1.1.1.2 Ensure systemd-journal-remote is configured

                Description:

                Journald (via systemd-journal-remote ) supports the ability to send log events it gathers to a remote log host or to receive messages from remote hosts, thus enabling centralised log management.

                Storing log data on a remote host protects log integrity from local attacks. If an attacker gains root access on the local system, they could tamper with or remove log data that is stored on the local system.

                Edit the /etc/systemd/journal-upload.conf file and ensure the following lines are set per your environment:

                URL=192.168.50.42

                ServerKeyFile=/etc/ssl/private/journal-upload.pem

                ServerCertificateFile=/etc/ssl/certs/journal-upload.pem

                TrustedCertificateFile=/etc/ssl/ca/trusted.pem

                Restart the service:

                # systemctl restart systemd-journal-upload



                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.1.2_Ensure_systemd-journal-remote_is_configured"
                                   role="unscored"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.896-04:00"
                                   version="1"
                                   weight="0.0">
                   <xccdf:result>notchecked</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/8/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AU-2, AU-12, SI-5</xccdf:ident>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: AU-2, AU-12, SI-5

                CIS Controls V7.0:

                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.2
                  Label: Activate audit logging
                  Description: Ensure that local logging has been enabled on all systems and networking devices.
                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.3
                  Label: Enable Detailed Logging
                  Description: Enable system logging to include detailed information such as a event source, date, user, timestamp, source addresses, destination addresses, and other useful elements.
                • >

                CIS Critical Security Controls V8.0:

                • Control 8: Audit Log Management: -- More
                  CIS Control Information
                  Control: Collect, alert, review, and retain audit logs of events that could help detect, understand, or recover from an attack.
                  Safeguard: 8.2
                  Label: Collect Audit Logs
                  Description: Collect audit logs. Ensure that logging, per the enterprise's audit log management process, has been enabled across enterprise assets.
                  Implementation Group: IG-1
                  Security Function: Detect
                • >

                Manual

                5.1.1.1.3 Ensure systemd-journal-remote is enabled

                Description:

                Journald (via systemd-journal-remote ) supports the ability to send log events it gathers to a remote log host or to receive messages from remote hosts, thus enabling centralised log management.

                Storing log data on a remote host protects log integrity from local attacks. If an attacker gains root access on the local system, they could tamper with or remove log data that is stored on the local system.

                Run the following command to enable systemd-journal-remote :

                # systemctl --now enable systemd-journal-upload.service

                Show Assessment Evidence
                Complex Check
                AND
                Criterion: Ensure systemd 'systemd-journal-upload.service' unit 'UnitFileState' property equals 'enabled'
                Existence Check: At Least One Exists
                Item Check: All
                Result: Fail
                Systemdunitproperty Item
                Name Type Status Value
                Unit String Exists systemd-journal-upload.service
                Property String Exists UnitFileState
                Value String Exists No Value


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.1.3_Ensure_systemd-journal-remote_is_enabled"
                                   role="unscored"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.896-04:00"
                                   version="1"
                                   weight="0.0">
                   <xccdf:result>informational</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/8/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AU-2, AU-12, CM-7, SI-5</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-export export-name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3994921"
                                             value-id="xccdf_org.cisecurity.benchmarks_value_3994921_var"/>
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994921"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994921">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994921"
                                       check="all"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure systemd 'systemd-journal-upload.service' unit 'UnitFileState' property equals 'enabled'</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="fail">Fail</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <caption>Systemdunitproperty Item</caption>
                                        <thead>
                                           <tr>
                                              <th scope="col">Name</th>
                                              <th scope="col">Type</th>
                                              <th scope="col">Status</th>
                                              <th scope="col">Value</th>
                                           </tr>
                                        </thead>
                                        <tbody class="tbe">
                                           <tr>
                                              <td>Unit</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>systemd-journal-upload.service</td>
                                           </tr>
                                           <tr>
                                              <td>Property</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>UnitFileState</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Value</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>No Value</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: AU-2, AU-12, CM-7, SI-5

                CIS Controls V7.0:

                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.2
                  Label: Activate audit logging
                  Description: Ensure that local logging has been enabled on all systems and networking devices.
                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.3
                  Label: Enable Detailed Logging
                  Description: Enable system logging to include detailed information such as a event source, date, user, timestamp, source addresses, destination addresses, and other useful elements.
                • >

                CIS Critical Security Controls V8.0:

                • Control 8: Audit Log Management: -- More
                  CIS Control Information
                  Control: Collect, alert, review, and retain audit logs of events that could help detect, understand, or recover from an attack.
                  Safeguard: 8.2
                  Label: Collect Audit Logs
                  Description: Collect audit logs. Ensure that logging, per the enterprise's audit log management process, has been enabled across enterprise assets.
                  Implementation Group: IG-1
                  Security Function: Detect
                • >

                Pass

                5.1.1.1.4 Ensure journald is not configured to receive logs from a remote client

                Description:

                Journald supports the ability to receive messages from remote hosts, thus acting as a log server. Clients should not receive data from other hosts.

                Note:

                • The same package, systemd-journal-remote , is used for both sending logs to remote hosts and receiving incoming logs.
                • With regards to receiving logs, there are two services; systemd-journal-remote.socket and systemd-journal-remote.service .

                If a client is configured to also receive data, thus turning it into a server, the client system is acting outside it's operational boundary.

                Run the following command to disable systemd-journal-remote.socket :

                # systemctl --now disable systemd-journal-remote.socket

                Show Assessment Evidence
                Complex Check
                AND
                Criterion: Ensure systemd 'systemd-journal-remote.socket' unit 'UnitFileState' property not equal 'enabled'
                Existence Check: At Least One Exists
                Item Check: All
                Result: Pass
                Systemdunitproperty Item
                Name Type Status Value
                Unit String Exists systemd-journal-remote.socket
                Property String Exists UnitFileState
                Value String Exists No Value


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.1.4_Ensure_journald_is_not_configured_to_receive_logs_from_a_remote_client"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.896-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>pass</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/8/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AU-2, AU-12, CM-6, CM-7</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-export export-name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3994924"
                                             value-id="xccdf_org.cisecurity.benchmarks_value_3994924_var"/>
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994924"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994924">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994924"
                                       check="all"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure systemd 'systemd-journal-remote.socket' unit 'UnitFileState' property not equal 'enabled'</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="pass">Pass</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <caption>Systemdunitproperty Item</caption>
                                        <thead>
                                           <tr>
                                              <th scope="col">Name</th>
                                              <th scope="col">Type</th>
                                              <th scope="col">Status</th>
                                              <th scope="col">Value</th>
                                           </tr>
                                        </thead>
                                        <tbody class="tbe">
                                           <tr>
                                              <td>Unit</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>systemd-journal-remote.socket</td>
                                           </tr>
                                           <tr>
                                              <td>Property</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>UnitFileState</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Value</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>No Value</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: AU-2, AU-12, CM-6, CM-7

                CIS Controls V7.0:

                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.2
                  Label: Activate audit logging
                  Description: Ensure that local logging has been enabled on all systems and networking devices.
                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.3
                  Label: Enable Detailed Logging
                  Description: Enable system logging to include detailed information such as a event source, date, user, timestamp, source addresses, destination addresses, and other useful elements.
                • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
                  CIS Control Information
                  Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
                  Subcontrol: 9.2
                  Label: Ensure Only Approved Ports, Protocols and Services Are Running
                  Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
                • >

                CIS Critical Security Controls V8.0:

                • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
                  CIS Control Information
                  Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
                  Safeguard: 4.8
                  Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
                  Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
                  Implementation Group: IG-2
                  Security Function: Protect
                • Control 8: Audit Log Management: -- More
                  CIS Control Information
                  Control: Collect, alert, review, and retain audit logs of events that could help detect, understand, or recover from an attack.
                  Safeguard: 8.2
                  Label: Collect Audit Logs
                  Description: Collect audit logs. Ensure that logging, per the enterprise's audit log management process, has been enabled across enterprise assets.
                  Implementation Group: IG-1
                  Security Function: Detect
                • >

                Pass

                5.1.1.2 Ensure journald service is enabled

                Description:

                Ensure that the systemd-journald service is enabled to allow capturing of logging events.

                If the systemd-journald service is not enabled to start on boot, the system will not capture logging events.

                By default the systemd-journald service does not have an [Install] section and thus cannot be enabled / disabled. It is meant to be referenced as Requires or Wants by other unit files. As such, if the status of systemd-journald is not static , investigate why.

                Show Assessment Evidence
                Complex Check
                AND
                Criterion: Ensure systemd 'systemd-journald' unit 'UnitFileState' property equals 'static'
                Existence Check: At Least One Exists
                Item Check: All
                Result: Pass
                Systemdunitproperty Item
                Name Type Status Value
                Unit String Exists systemd-journald
                Property String Exists UnitFileState
                Value String Exists static


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.2_Ensure_journald_service_is_enabled"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.896-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>pass</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/8/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AU-2, AU-7 AU-12</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-export export-name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3994927"
                                             value-id="xccdf_org.cisecurity.benchmarks_value_3994927_var"/>
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994927"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994927">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994927"
                                       check="all"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure systemd 'systemd-journald' unit 'UnitFileState' property equals 'static'</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="pass">Pass</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <caption>Systemdunitproperty Item</caption>
                                        <thead>
                                           <tr>
                                              <th scope="col">Name</th>
                                              <th scope="col">Type</th>
                                              <th scope="col">Status</th>
                                              <th scope="col">Value</th>
                                           </tr>
                                        </thead>
                                        <tbody class="tbe">
                                           <tr>
                                              <td>Unit</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>systemd-journald</td>
                                           </tr>
                                           <tr>
                                              <td>Property</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>UnitFileState</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Value</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>static</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: AU-2, AU-7 AU-12

                CIS Controls V7.0:

                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.2
                  Label: Activate audit logging
                  Description: Ensure that local logging has been enabled on all systems and networking devices.
                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.3
                  Label: Enable Detailed Logging
                  Description: Enable system logging to include detailed information such as a event source, date, user, timestamp, source addresses, destination addresses, and other useful elements.
                • >

                CIS Critical Security Controls V8.0:

                • Control 8: Audit Log Management: -- More
                  CIS Control Information
                  Control: Collect, alert, review, and retain audit logs of events that could help detect, understand, or recover from an attack.
                  Safeguard: 8.2
                  Label: Collect Audit Logs
                  Description: Collect audit logs. Ensure that logging, per the enterprise's audit log management process, has been enabled across enterprise assets.
                  Implementation Group: IG-1
                  Security Function: Detect
                • >

                Fail

                5.1.1.3 Ensure journald is configured to compress large log files

                Description:

                The journald system includes the capability of compressing overly large files to avoid filling up the system with logs or making the logs unmanageably large.

                Uncompressed large files may unexpectedly fill a filesystem leading to resource unavailability. Compressing logs prior to write can prevent sudden, unexpected filesystem impacts.

                Edit the /etc/systemd/journald.conf file or a file ending in .conf in /etc/systemd/journald.conf.d/ and add the following line:

                Compress=yes

                Restart the service:

                # systemctl restart systemd-journald

                Show Assessment Evidence
                Complex Check
                OR
                Criterion: Ensure at least one file named /etc/systemd/journald.conf exists and matches pattern (?i)^\h*Compress\h*=\h*yes\b
                Existence Check: At Least One Exists
                Item Check: All
                Result: Fail
                No matching system items were found.
                Criterion: Ensure at least one file(s) named ^.+$ in /etc/systemd/journald.conf.d/ exists and matches pattern (?i)^\h*Compress\h*=\h*yes\b
                Existence Check: At Least One Exists
                Item Check: All
                Result: Fail
                No matching system items were found.


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.3_Ensure_journald_is_configured_to_compress_large_log_files"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.896-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>fail</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/4"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/8/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/8/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AU-4</xccdf:ident>
                   <xccdf:complex-check operator="OR" negate="false">
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994930"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994930">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994930"
                                       check="all"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure at least one file named /etc/systemd/journald.conf exists and matches pattern (?i)^\h*Compress\h*=\h*yes\b</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="fail">Fail</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <tr>
                                           <td>No matching system items were found.</td>
                                        </tr>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994932"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994932">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994932"
                                       check="all"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure at least one file(s) named ^.+$ in /etc/systemd/journald.conf.d/ exists and matches pattern (?i)^\h*Compress\h*=\h*yes\b</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="fail">Fail</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <tr>
                                           <td>No matching system items were found.</td>
                                        </tr>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: AU-4

                CIS Controls V7.0:

                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.2
                  Label: Activate audit logging
                  Description: Ensure that local logging has been enabled on all systems and networking devices.
                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.3
                  Label: Enable Detailed Logging
                  Description: Enable system logging to include detailed information such as a event source, date, user, timestamp, source addresses, destination addresses, and other useful elements.
                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.4
                  Label: Ensure adequate storage for logs
                  Description: Ensure that all systems that store logs have adequate storage space for the logs generated.
                • >

                CIS Critical Security Controls V8.0:

                • Control 8: Audit Log Management: -- More
                  CIS Control Information
                  Control: Collect, alert, review, and retain audit logs of events that could help detect, understand, or recover from an attack.
                  Safeguard: 8.2
                  Label: Collect Audit Logs
                  Description: Collect audit logs. Ensure that logging, per the enterprise's audit log management process, has been enabled across enterprise assets.
                  Implementation Group: IG-1
                  Security Function: Detect
                • Control 8: Audit Log Management: -- More
                  CIS Control Information
                  Control: Collect, alert, review, and retain audit logs of events that could help detect, understand, or recover from an attack.
                  Safeguard: 8.3
                  Label: Ensure Adequate Audit Log Storage
                  Description: Ensure that logging destinations maintain adequate storage to comply with the enterprise's audit log management process.
                  Implementation Group: IG-1
                  Security Function: Protect
                • >

                Fail

                5.1.1.4 Ensure journald is configured to write logfiles to persistent disk

                Description:

                Data from journald may be stored in volatile memory or persisted locally on the server. Logs in memory will be lost upon a system reboot. By persisting logs to local disk on the server they are protected from loss due to a reboot.

                Writing log data to disk will provide the ability to forensically reconstruct events which may have impacted the operations or security of a system even after a system crash or reboot.

                Edit the /etc/systemd/journald.conf file or a file ending in .conf in /etc/systemd/journald.conf.d/ and add the following line:

                Storage=persistent

                Restart the service:

                # systemctl restart systemd-journald

                Show Assessment Evidence
                Complex Check
                OR
                Criterion: Ensure at least one file named /etc/systemd/journald.conf exists and matches pattern (?i)^\h*Storage\h*=\h*persistent\b
                Existence Check: At Least One Exists
                Item Check: All
                Result: Fail
                No matching system items were found.
                Criterion: Ensure at least one file(s) named ^.+$ in /etc/systemd/journald.conf.d/ exists and matches pattern (?i)^\h*Storage\h*=\h*persistent\b
                Existence Check: At Least One Exists
                Item Check: All
                Result: Fail
                No matching system items were found.


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.4_Ensure_journald_is_configured_to_write_logfiles_to_persistent_disk"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.896-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>fail</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/8/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AU-3, AU-12</xccdf:ident>
                   <xccdf:complex-check operator="OR" negate="false">
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994936"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994936">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994936"
                                       check="all"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure at least one file named /etc/systemd/journald.conf exists and matches pattern (?i)^\h*Storage\h*=\h*persistent\b</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="fail">Fail</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <tr>
                                           <td>No matching system items were found.</td>
                                        </tr>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994938"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994938">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994938"
                                       check="all"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure at least one file(s) named ^.+$ in /etc/systemd/journald.conf.d/ exists and matches pattern (?i)^\h*Storage\h*=\h*persistent\b</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="fail">Fail</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <tr>
                                           <td>No matching system items were found.</td>
                                        </tr>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: AU-3, AU-12

                CIS Controls V7.0:

                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.2
                  Label: Activate audit logging
                  Description: Ensure that local logging has been enabled on all systems and networking devices.
                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.3
                  Label: Enable Detailed Logging
                  Description: Enable system logging to include detailed information such as a event source, date, user, timestamp, source addresses, destination addresses, and other useful elements.
                • >

                CIS Critical Security Controls V8.0:

                • Control 8: Audit Log Management: -- More
                  CIS Control Information
                  Control: Collect, alert, review, and retain audit logs of events that could help detect, understand, or recover from an attack.
                  Safeguard: 8.2
                  Label: Collect Audit Logs
                  Description: Collect audit logs. Ensure that logging, per the enterprise's audit log management process, has been enabled across enterprise assets.
                  Implementation Group: IG-1
                  Security Function: Detect
                • >

                Manual

                5.1.1.5 Ensure journald is not configured to send logs to rsyslog

                Description:

                Data from journald should be kept in the confines of the service and not forwarded on to other services.

                IF journald is the method for capturing logs, all logs of the system should be handled by journald and not forwarded to other logging mechanisms.

                Edit the /etc/systemd/journald.conf file and files in /etc/systemd/journald.conf.d/ and ensure that ForwardToSyslog=yes is removed.

                Restart the service:

                # systemctl restart systemd-journald

                Show Assessment Evidence
                Complex Check
                AND
                Criterion: Ensure no file named /etc/systemd/journald.conf exists and matches pattern (?i)^\h*ForwardToSyslog\h*=\h*yes\b
                Existence Check: None Exist
                Item Check: All
                Result: Pass
                No matching system items were found.
                Criterion: Ensure no file(s) named ^.+$ in /etc/systemd/journald.conf.d/ exists and matches pattern (?i)^\h*ForwardToSyslog\h*=\h*yes\b
                Existence Check: None Exist
                Item Check: All
                Result: Pass
                No matching system items were found.


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.5_Ensure_journald_is_not_configured_to_send_logs_to_rsyslog"
                                   role="unscored"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.896-04:00"
                                   version="1"
                                   weight="0.0">
                   <xccdf:result>informational</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/5"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/8/subcontrol/9"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/8/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AU-2, AU-6, AU-7, AU-12</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994942"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994942">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994942"
                                       check="all"
                                       check_existence="none_exist">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure no file named /etc/systemd/journald.conf exists and matches pattern (?i)^\h*ForwardToSyslog\h*=\h*yes\b</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>None Exist</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="pass">Pass</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <tr>
                                           <td>No matching system items were found.</td>
                                        </tr>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994944"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994944">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994944"
                                       check="all"
                                       check_existence="none_exist">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure no file(s) named ^.+$ in /etc/systemd/journald.conf.d/ exists and matches pattern (?i)^\h*ForwardToSyslog\h*=\h*yes\b</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>None Exist</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="pass">Pass</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <tr>
                                           <td>No matching system items were found.</td>
                                        </tr>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: AU-2, AU-6, AU-7, AU-12

                CIS Controls V7.0:

                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.2
                  Label: Activate audit logging
                  Description: Ensure that local logging has been enabled on all systems and networking devices.
                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.3
                  Label: Enable Detailed Logging
                  Description: Enable system logging to include detailed information such as a event source, date, user, timestamp, source addresses, destination addresses, and other useful elements.
                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.5
                  Label: Central Log Management
                  Description: Ensure that appropriate logs are being aggregated to a central log management system for analysis and review.
                • >

                CIS Critical Security Controls V8.0:

                • Control 8: Audit Log Management: -- More
                  CIS Control Information
                  Control: Collect, alert, review, and retain audit logs of events that could help detect, understand, or recover from an attack.
                  Safeguard: 8.2
                  Label: Collect Audit Logs
                  Description: Collect audit logs. Ensure that logging, per the enterprise's audit log management process, has been enabled across enterprise assets.
                  Implementation Group: IG-1
                  Security Function: Detect
                • Control 8: Audit Log Management: -- More
                  CIS Control Information
                  Control: Collect, alert, review, and retain audit logs of events that could help detect, understand, or recover from an attack.
                  Safeguard: 8.9
                  Label: Centralize Audit Logs
                  Description: Centralize, to the extent possible, audit log collection and retention across enterprise assets.
                  Implementation Group: IG-2
                  Security Function: Detect
                • >

                Manual

                5.1.1.6 Ensure journald log rotation is configured per site policy

                Description:

                Journald includes the capability of rotating log files regularly to avoid filling up the system with logs or making the logs unmanageably large. The file /etc/systemd/journald.conf is the configuration file used to specify how logs generated by Journald should be rotated.

                By keeping the log files smaller and more manageable, a system administrator can easily archive these files to another system and spend less time looking through inordinately large log files.

                Review /etc/systemd/journald.conf and verify logs are rotated according to site policy. The settings should be carefully understood as there are specific edge cases and prioritisation of parameters.

                The specific parameters for log rotation are:

                SystemMaxUse=

                SystemKeepFree=

                RuntimeMaxUse=

                RuntimeKeepFree=

                MaxFileSec=



                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.6_Ensure_journald_log_rotation_is_configured_per_site_policy"
                                   role="unscored"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.896-04:00"
                                   version="1"
                                   weight="0.0">
                   <xccdf:result>notchecked</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/8/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AU-2, AU-7, AU-12</xccdf:ident>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: AU-2, AU-7, AU-12

                CIS Controls V7.0:

                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.2
                  Label: Activate audit logging
                  Description: Ensure that local logging has been enabled on all systems and networking devices.
                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.3
                  Label: Enable Detailed Logging
                  Description: Enable system logging to include detailed information such as a event source, date, user, timestamp, source addresses, destination addresses, and other useful elements.
                • >

                CIS Critical Security Controls V8.0:

                • Control 8: Audit Log Management: -- More
                  CIS Control Information
                  Control: Collect, alert, review, and retain audit logs of events that could help detect, understand, or recover from an attack.
                  Safeguard: 8.2
                  Label: Collect Audit Logs
                  Description: Collect audit logs. Ensure that logging, per the enterprise's audit log management process, has been enabled across enterprise assets.
                  Implementation Group: IG-1
                  Security Function: Detect
                • >

                Manual

                5.1.1.7 Ensure journald default file permissions configured

                Description:

                Journald will create logfiles that do not already exist on the system. This setting controls what permissions will be applied to these newly created files.

                It is important to ensure that log files have the correct permissions to ensure that sensitive data is archived and protected.

                If the default configuration is not appropriate for the site specific requirements, copy /usr/lib/tmpfiles.d/systemd.conf to /etc/tmpfiles.d/systemd.conf and modify as required. Requirements is either 0640 or site policy if that is less restrictive.



                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_5.1.1.7_Ensure_journald_default_file_permissions_configured"
                                   role="unscored"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.896-04:00"
                                   version="1"
                                   weight="0.0">
                   <xccdf:result>notchecked</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/5/subcontrol/1"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/8/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3, AU-2, AU-12, MP-2, SI-5</xccdf:ident>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: AC-3, AU-2, AU-12, MP-2, SI-5

                CIS Controls V7.0:

                • Control 5: Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers: -- More
                  CIS Control Information
                  Control: Establish, implement, and actively manage (track, report on, correct) the security configuration of mobile devices, laptops, servers, and workstations using a rigorous configuration management and change control process in order to prevent attackers from exploiting vulnerable services and settings.
                  Subcontrol: 5.1
                  Label: Establish Secure Configurations
                  Description: Maintain documented, standard security configuration standards for all authorized operating systems and software.
                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.2
                  Label: Activate audit logging
                  Description: Ensure that local logging has been enabled on all systems and networking devices.
                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.3
                  Label: Enable Detailed Logging
                  Description: Enable system logging to include detailed information such as a event source, date, user, timestamp, source addresses, destination addresses, and other useful elements.
                • >

                CIS Critical Security Controls V8.0:

                • Control 3: Data Protection: -- More
                  CIS Control Information
                  Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
                  Safeguard: 3.3
                  Label: Configure Data Access Control Lists
                  Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
                  Implementation Group: IG-1
                  Security Function: Protect
                • Control 8: Audit Log Management: -- More
                  CIS Control Information
                  Control: Collect, alert, review, and retain audit logs of events that could help detect, understand, or recover from an attack.
                  Safeguard: 8.2
                  Label: Collect Audit Logs
                  Description: Collect audit logs. Ensure that logging, per the enterprise's audit log management process, has been enabled across enterprise assets.
                  Implementation Group: IG-1
                  Security Function: Detect
                • >

                5.1.2 Configure rsyslog

                The rsyslog software package may be used instead of the default journald logging mechanism.

                Note: This section only applies if rsyslog is the chosen method for client side logging. Do not apply this section if journald is used.

                Fail

                5.1.2.1 Ensure rsyslog is installed

                Description:

                The rsyslog software is recommended in environments where journald does not meet operation requirements.

                The security enhancements of rsyslog such as connection-oriented (i.e. TCP) transmission of logs, the option to log to database formats, and the encryption of log data en route to a central logging server) justify installing and configuring the package.

                Run the following command to install rsyslog :

                # apt install rsyslog

                Show Assessment Evidence
                Complex Check
                OR
                Criterion: Ensure package name equals 'rsyslog' is installed
                Existence Check: At Least One Exists
                Item Check: All
                Result: Fail
                No matching system items were found.
                Criterion: Ensure package name equals 'systemd-journal-remote' is installed
                Existence Check: At Least One Exists
                Item Check: All
                Result: Fail
                No matching system items were found.


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_5.1.2.1_Ensure_rsyslog_is_installed"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.897-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>fail</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/8/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AU-3, AU-12, SI-5</xccdf:ident>
                   <xccdf:complex-check operator="OR" negate="false">
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994950"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994950">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994950"
                                       check="all"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure package name equals 'rsyslog' is installed</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="fail">Fail</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <tr>
                                           <td>No matching system items were found.</td>
                                        </tr>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994952"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994952">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994952"
                                       check="all"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure package name equals 'systemd-journal-remote' is installed</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="fail">Fail</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <tr>
                                           <td>No matching system items were found.</td>
                                        </tr>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: AU-3, AU-12, SI-5

                CIS Controls V7.0:

                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.2
                  Label: Activate audit logging
                  Description: Ensure that local logging has been enabled on all systems and networking devices.
                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.3
                  Label: Enable Detailed Logging
                  Description: Enable system logging to include detailed information such as a event source, date, user, timestamp, source addresses, destination addresses, and other useful elements.
                • >

                CIS Critical Security Controls V8.0:

                • Control 8: Audit Log Management: -- More
                  CIS Control Information
                  Control: Collect, alert, review, and retain audit logs of events that could help detect, understand, or recover from an attack.
                  Safeguard: 8.2
                  Label: Collect Audit Logs
                  Description: Collect audit logs. Ensure that logging, per the enterprise's audit log management process, has been enabled across enterprise assets.
                  Implementation Group: IG-1
                  Security Function: Detect
                • >

                Fail

                5.1.2.2 Ensure rsyslog service is enabled

                Description:

                Once the rsyslog package is installed, ensure that the service is enabled.

                If the rsyslog service is not enabled to start on boot, the system will not capture logging events.

                Run the following command to enable rsyslog :

                # systemctl --now enable rsyslog

                Show Assessment Evidence
                Complex Check
                AND
                Criterion: Ensure systemd 'rsyslog.service' unit 'UnitFileState' property equals 'enabled'
                Existence Check: At Least One Exists
                Item Check: All
                Result: Fail
                Systemdunitproperty Item
                Name Type Status Value
                Unit String Exists rsyslog.service
                Property String Exists UnitFileState
                Value String Exists No Value


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_5.1.2.2_Ensure_rsyslog_service_is_enabled"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.897-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>fail</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/8/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AU-3, AU-12</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-export export-name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3994954"
                                             value-id="xccdf_org.cisecurity.benchmarks_value_3994954_var"/>
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994954"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994954">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994954"
                                       check="all"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure systemd 'rsyslog.service' unit 'UnitFileState' property equals 'enabled'</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="fail">Fail</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <caption>Systemdunitproperty Item</caption>
                                        <thead>
                                           <tr>
                                              <th scope="col">Name</th>
                                              <th scope="col">Type</th>
                                              <th scope="col">Status</th>
                                              <th scope="col">Value</th>
                                           </tr>
                                        </thead>
                                        <tbody class="tbe">
                                           <tr>
                                              <td>Unit</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>rsyslog.service</td>
                                           </tr>
                                           <tr>
                                              <td>Property</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>UnitFileState</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Value</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>No Value</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: AU-3, AU-12

                CIS Controls V7.0:

                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.2
                  Label: Activate audit logging
                  Description: Ensure that local logging has been enabled on all systems and networking devices.
                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.3
                  Label: Enable Detailed Logging
                  Description: Enable system logging to include detailed information such as a event source, date, user, timestamp, source addresses, destination addresses, and other useful elements.
                • >

                CIS Critical Security Controls V8.0:

                • Control 8: Audit Log Management: -- More
                  CIS Control Information
                  Control: Collect, alert, review, and retain audit logs of events that could help detect, understand, or recover from an attack.
                  Safeguard: 8.2
                  Label: Collect Audit Logs
                  Description: Collect audit logs. Ensure that logging, per the enterprise's audit log management process, has been enabled across enterprise assets.
                  Implementation Group: IG-1
                  Security Function: Detect
                • >

                Manual

                5.1.2.3 Ensure journald is configured to send logs to rsyslog

                Description:

                Data from journald may be stored in volatile memory or persisted locally on the server. Utilities exist to accept remote export of journald logs, however, use of the RSyslog service provides a consistent means of log collection and export.

                IF RSyslog is the preferred method for capturing logs, all logs of the system should be sent to it for further processing.

                Edit the /etc/systemd/journald.conf file and add the following line:

                ForwardToSyslog=yes

                Restart the service:

                # systemctl restart rsyslog

                Show Assessment Evidence
                Complex Check
                AND
                Criterion: Ensure at least one file named /etc/systemd/journald.conf exists and matches pattern ^\s*(?i)ForwardToSyslog\s*=\s*yes(\s+#.*)*$
                Existence Check: At Least One Exists
                Item Check: All
                Result: Fail
                No matching system items were found.


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_5.1.2.3_Ensure_journald_is_configured_to_send_logs_to_rsyslog"
                                   role="unscored"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.897-04:00"
                                   version="1"
                                   weight="0.0">
                   <xccdf:result>informational</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/5"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/8/subcontrol/9"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/8/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AU-9</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994959"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994959">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994959"
                                       check="all"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure at least one file named /etc/systemd/journald.conf exists and matches pattern ^\s*(?i)ForwardToSyslog\s*=\s*yes(\s+#.*)*$</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="fail">Fail</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <tr>
                                           <td>No matching system items were found.</td>
                                        </tr>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: AU-9

                CIS Controls V7.0:

                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.2
                  Label: Activate audit logging
                  Description: Ensure that local logging has been enabled on all systems and networking devices.
                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.3
                  Label: Enable Detailed Logging
                  Description: Enable system logging to include detailed information such as a event source, date, user, timestamp, source addresses, destination addresses, and other useful elements.
                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.5
                  Label: Central Log Management
                  Description: Ensure that appropriate logs are being aggregated to a central log management system for analysis and review.
                • >

                CIS Critical Security Controls V8.0:

                • Control 8: Audit Log Management: -- More
                  CIS Control Information
                  Control: Collect, alert, review, and retain audit logs of events that could help detect, understand, or recover from an attack.
                  Safeguard: 8.2
                  Label: Collect Audit Logs
                  Description: Collect audit logs. Ensure that logging, per the enterprise's audit log management process, has been enabled across enterprise assets.
                  Implementation Group: IG-1
                  Security Function: Detect
                • Control 8: Audit Log Management: -- More
                  CIS Control Information
                  Control: Collect, alert, review, and retain audit logs of events that could help detect, understand, or recover from an attack.
                  Safeguard: 8.9
                  Label: Centralize Audit Logs
                  Description: Centralize, to the extent possible, audit log collection and retention across enterprise assets.
                  Implementation Group: IG-2
                  Security Function: Detect
                • >

                Fail

                5.1.2.4 Ensure rsyslog default file permissions are configured

                Description:

                RSyslog will create logfiles that do not already exist on the system. This setting controls what permissions will be applied to these newly created files.

                It is important to ensure that log files have the correct permissions to ensure that sensitive data is archived and protected.

                Edit either /etc/rsyslog.conf or a dedicated .conf file in /etc/rsyslog.d/ and set $FileCreateMode to 0640 or more restrictive:

                $FileCreateMode 0640

                Restart the service:

                # systemctl restart rsyslog

                Impact:

                The systems global umask could override, but only making the file permissions stricter, what is configured in RSyslog with the FileCreateMode directive. RSyslog also has it's own $umask directive that can alter the intended file creation mode. In addition, consideration should be given to how FileCreateMode is used.

                Thus it is critical to ensure that the intended file creation mode is not overridden with less restrictive settings in /etc/rsyslog.conf , /etc/rsyslog.d/*conf files and that FileCreateMode is set before any file is created.

                Show Assessment Evidence
                Complex Check
                OR
                Criterion: Ensure at least one file named /etc/rsyslog.conf exists and matches pattern ^\s*\$FileCreateMode\s+0[6420][40]0\s*(\s+#.*)?$
                Existence Check: At Least One Exists
                Item Check: All
                Result: Fail
                No matching system items were found.
                Criterion: Ensure at least one file(s) named .*\.conf in /etc/rsyslog.d/ exists and matches pattern ^\s*\$FileCreateMode\s+0[6420][40]0\s*(\s+#.*)?$
                Existence Check: At Least One Exists
                Item Check: At least one
                Result: Fail
                No matching system items were found.


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_5.1.2.4_Ensure_rsyslog_default_file_permissions_are_configured"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.897-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>fail</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/5/subcontrol/1"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/8/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">See the rsyslog.conf(5) man page for more information.</xccdf:ident>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3, AC-6, MP-2</xccdf:ident>
                   <xccdf:complex-check operator="OR" negate="false">
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994961"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994961">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994961"
                                       check="all"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure at least one file named /etc/rsyslog.conf exists and matches pattern ^\s*\$FileCreateMode\s+0[6420][40]0\s*(\s+#.*)?$</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="fail">Fail</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <tr>
                                           <td>No matching system items were found.</td>
                                        </tr>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994963"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994963">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994963"
                                       check="at least one"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure at least one file(s) named .*\.conf in /etc/rsyslog.d/ exists and matches pattern ^\s*\$FileCreateMode\s+0[6420][40]0\s*(\s+#.*)?$</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>At least one</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="fail">Fail</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <tr>
                                           <td>No matching system items were found.</td>
                                        </tr>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: See the rsyslog.conf(5) man page for more information.
                • URL: NIST SP 800-53 Rev. 5: AC-3, AC-6, MP-2

                CIS Controls V7.0:

                • Control 5: Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers: -- More
                  CIS Control Information
                  Control: Establish, implement, and actively manage (track, report on, correct) the security configuration of mobile devices, laptops, servers, and workstations using a rigorous configuration management and change control process in order to prevent attackers from exploiting vulnerable services and settings.
                  Subcontrol: 5.1
                  Label: Establish Secure Configurations
                  Description: Maintain documented, standard security configuration standards for all authorized operating systems and software.
                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.2
                  Label: Activate audit logging
                  Description: Ensure that local logging has been enabled on all systems and networking devices.
                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.3
                  Label: Enable Detailed Logging
                  Description: Enable system logging to include detailed information such as a event source, date, user, timestamp, source addresses, destination addresses, and other useful elements.
                • >

                CIS Critical Security Controls V8.0:

                • Control 3: Data Protection: -- More
                  CIS Control Information
                  Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
                  Safeguard: 3.3
                  Label: Configure Data Access Control Lists
                  Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
                  Implementation Group: IG-1
                  Security Function: Protect
                • Control 8: Audit Log Management: -- More
                  CIS Control Information
                  Control: Collect, alert, review, and retain audit logs of events that could help detect, understand, or recover from an attack.
                  Safeguard: 8.2
                  Label: Collect Audit Logs
                  Description: Collect audit logs. Ensure that logging, per the enterprise's audit log management process, has been enabled across enterprise assets.
                  Implementation Group: IG-1
                  Security Function: Detect
                • >

                Manual

                5.1.2.5 Ensure logging is configured

                Description:

                The /etc/rsyslog.conf and /etc/rsyslog.d/*.conf files specifies rules for logging and which files are to be used to log certain classes of messages.

                A great deal of important security-related information is sent via rsyslog (e.g., successful and failed su attempts, failed login attempts, root login attempts, etc.).

                Edit the following lines in the /etc/rsyslog.conf and /etc/rsyslog.d/*.conf files as appropriate for your environment.

                NOTE: The below configuration is shown for example purposes only. Due care should be given to how the organization wish to store log data.

                *.emerg :omusrmsg:*

                auth,authpriv.* /var/log/secure

                mail.* -/var/log/mail

                mail.info -/var/log/mail.info

                mail.warning -/var/log/mail.warn

                mail.err /var/log/mail.err

                cron.* /var/log/cron

                *.=warning;*.=err -/var/log/warn

                *.crit /var/log/warn

                *.*;mail.none;news.none -/var/log/messages

                local0,local1.* -/var/log/localmessages

                local2,local3.* -/var/log/localmessages

                local4,local5.* -/var/log/localmessages

                local6,local7.* -/var/log/localmessages

                Run the following command to reload the rsyslogd configuration:

                # systemctl restart rsyslog



                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_5.1.2.5_Ensure_logging_is_configured"
                                   role="unscored"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.897-04:00"
                                   version="1"
                                   weight="0.0">
                   <xccdf:result>notchecked</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/8/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">See the rsyslog.conf(5) man page for more information.</xccdf:ident>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AU-2, AU-7, AU-12</xccdf:ident>
                </xccdf:rule-result>
                

                References:

                • URL: See the rsyslog.conf(5) man page for more information.
                • URL: NIST SP 800-53 Rev. 5: AU-2, AU-7, AU-12

                CIS Controls V7.0:

                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.2
                  Label: Activate audit logging
                  Description: Ensure that local logging has been enabled on all systems and networking devices.
                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.3
                  Label: Enable Detailed Logging
                  Description: Enable system logging to include detailed information such as a event source, date, user, timestamp, source addresses, destination addresses, and other useful elements.
                • >

                CIS Critical Security Controls V8.0:

                • Control 8: Audit Log Management: -- More
                  CIS Control Information
                  Control: Collect, alert, review, and retain audit logs of events that could help detect, understand, or recover from an attack.
                  Safeguard: 8.2
                  Label: Collect Audit Logs
                  Description: Collect audit logs. Ensure that logging, per the enterprise's audit log management process, has been enabled across enterprise assets.
                  Implementation Group: IG-1
                  Security Function: Detect
                • >

                Manual

                5.1.2.6 Ensure rsyslog is configured to send logs to a remote log host

                Description:

                RSyslog supports the ability to send log events it gathers to a remote log host or to receive messages from remote hosts, thus enabling centralised log management.

                Storing log data on a remote host protects log integrity from local attacks. If an attacker gains root access on the local system, they could tamper with or remove log data that is stored on the local system.

                Edit the /etc/rsyslog.conf and /etc/rsyslog.d/*.conf files and add the following line (where loghost.example.com is the name of your central log host). The target directive may either be a fully qualified domain name or an IP address.

                *.* action(type="omfwd" target="192.168.2.100" port="514" protocol="tcp"

                action.resumeRetryCount="100"

                queue.type="LinkedList" queue.size="1000")

                Run the following command to reload the rsyslogd configuration:

                # systemctl restart rsyslog

                Show Assessment Evidence
                Complex Check
                OR
                Criterion: Ensure at least one file named /etc/rsyslog.conf exists and matches pattern ^\s*\*\.\*\s+@
                Existence Check: At Least One Exists
                Item Check: All
                Result: Fail
                No matching system items were found.
                Criterion: Ensure at least one file(s) named .*\.conf in /etc/rsyslog.d/ exists and matches pattern ^\s*\*\.\*\s+@
                Existence Check: At Least One Exists
                Item Check: At least one
                Result: Fail
                No matching system items were found.


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_5.1.2.6_Ensure_rsyslog_is_configured_to_send_logs_to_a_remote_log_host"
                                   role="unscored"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.897-04:00"
                                   version="1"
                                   weight="0.0">
                   <xccdf:result>informational</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/8/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">See the rsyslog.conf(5) man page for more information.</xccdf:ident>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AU-6</xccdf:ident>
                   <xccdf:complex-check operator="OR" negate="false">
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994968"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994968">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994968"
                                       check="all"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure at least one file named /etc/rsyslog.conf exists and matches pattern ^\s*\*\.\*\s+@</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="fail">Fail</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <tr>
                                           <td>No matching system items were found.</td>
                                        </tr>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994971"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994971">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994971"
                                       check="at least one"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure at least one file(s) named .*\.conf in /etc/rsyslog.d/ exists and matches pattern ^\s*\*\.\*\s+@</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>At least one</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="fail">Fail</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <tr>
                                           <td>No matching system items were found.</td>
                                        </tr>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: See the rsyslog.conf(5) man page for more information.
                • URL: NIST SP 800-53 Rev. 5: AU-6

                CIS Controls V7.0:

                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.2
                  Label: Activate audit logging
                  Description: Ensure that local logging has been enabled on all systems and networking devices.
                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.3
                  Label: Enable Detailed Logging
                  Description: Enable system logging to include detailed information such as a event source, date, user, timestamp, source addresses, destination addresses, and other useful elements.
                • >

                CIS Critical Security Controls V8.0:

                • Control 8: Audit Log Management: -- More
                  CIS Control Information
                  Control: Collect, alert, review, and retain audit logs of events that could help detect, understand, or recover from an attack.
                  Safeguard: 8.2
                  Label: Collect Audit Logs
                  Description: Collect audit logs. Ensure that logging, per the enterprise's audit log management process, has been enabled across enterprise assets.
                  Implementation Group: IG-1
                  Security Function: Detect
                • >

                Pass

                5.1.2.7 Ensure rsyslog is not configured to receive logs from a remote client

                Description:

                RSyslog supports the ability to receive messages from remote hosts, thus acting as a log server. Clients should not receive data from other hosts.

                If a client is configured to also receive data, thus turning it into a server, the client system is acting outside it's operational boundary.

                Should there be any active log server configuration found in the auditing section, modify those file and remove the specific lines highlighted by the audit. Ensure none of the following entries are present in any of /etc/rsyslog.conf or /etc/rsyslog.d/*.conf .

                Old format

                $ModLoad imtcp

                $InputTCPServerRun

                New format

                module(load="imtcp")

                input(type="imtcp" port="514")

                Restart the service:

                # systemctl restart rsyslog

                Show Assessment Evidence
                Complex Check
                OR
                Criterion: Ensure no file named /etc/rsyslog.conf exists and matches pattern ^\s*\*\.\*\s+@
                Existence Check: None Exist
                Item Check: All
                Result: Pass
                No matching system items were found.
                Criterion: Ensurefile(s) named .*\.conf in /etc/rsyslog.d/ exists and matches pattern ^\s*\*\.\*\s+@
                Existence Check: None Exist
                Item Check: All
                Result: Pass
                No matching system items were found.


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_5.1.2.7_Ensure_rsyslog_is_not_configured_to_receive_logs_from_a_remote_client"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.897-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>pass</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/9/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/4/subcontrol/8"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/6/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/8/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AU-2, AU-6, AU-7, AU-12</xccdf:ident>
                   <xccdf:complex-check operator="OR" negate="false">
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994974"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994974">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994974"
                                       check="all"
                                       check_existence="none_exist">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure no file named /etc/rsyslog.conf exists and matches pattern ^\s*\*\.\*\s+@</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>None Exist</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="pass">Pass</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <tr>
                                           <td>No matching system items were found.</td>
                                        </tr>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994977"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3994977">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3994977"
                                       check="all"
                                       check_existence="none_exist">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensurefile(s) named .*\.conf in /etc/rsyslog.d/ exists and matches pattern ^\s*\*\.\*\s+@</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>None Exist</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="pass">Pass</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <tr>
                                           <td>No matching system items were found.</td>
                                        </tr>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: AU-2, AU-6, AU-7, AU-12

                CIS Controls V7.0:

                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.2
                  Label: Activate audit logging
                  Description: Ensure that local logging has been enabled on all systems and networking devices.
                • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                  CIS Control Information
                  Control: Collect, manage and analyze audit logs of events that could help detect, understand, or recover from an attack.
                  Subcontrol: 6.3
                  Label: Enable Detailed Logging
                  Description: Enable system logging to include detailed information such as a event source, date, user, timestamp, source addresses, destination addresses, and other useful elements.
                • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
                  CIS Control Information
                  Control: Manage (track/control/correct) the ongoing operational use of ports, protocols, and services on networked devices in order to minimize windows of vulnerability available to attackers.
                  Subcontrol: 9.2
                  Label: Ensure Only Approved Ports, Protocols and Services Are Running
                  Description: Ensure that only network ports, protocols, and services listening on a system with validated business needs are running on each system.
                • >

                CIS Critical Security Controls V8.0:

                • Control 4: Secure Configuration of Enterprise Assets and Software: -- More
                  CIS Control Information
                  Control: Establish and maintain the secure configuration of enterprise assets (end-user devices, including portable and mobile; network devices; non-computing/IoT devices; and servers) and software (operating systems and applications).
                  Safeguard: 4.8
                  Label: Uninstall or Disable Unnecessary Services on Enterprise Assets and Software
                  Description: Uninstall or disable unnecessary services on enterprise assets and software, such as an unused file sharing service, web application module, or service function.
                  Implementation Group: IG-2
                  Security Function: Protect
                • Control 8: Audit Log Management: -- More
                  CIS Control Information
                  Control: Collect, alert, review, and retain audit logs of events that could help detect, understand, or recover from an attack.
                  Safeguard: 8.2
                  Label: Collect Audit Logs
                  Description: Collect audit logs. Ensure that logging, per the enterprise's audit log management process, has been enabled across enterprise assets.
                  Implementation Group: IG-1
                  Security Function: Detect
                • >

                Pass

                5.1.3 Ensure all logfiles have appropriate access configured

                Description:

                Log files stored in /var/log/ contain logged information from many services on the system and potentially from other logged hosts as well.

                It is important that log files have the correct permissions to ensure that sensitive data is protected and that only the appropriate users / groups have access to them.

                Run the following script to update permissions and ownership on files in /var/log .

                Although the script is not destructive, ensure that the output is captured in the event that the remediation causes issues.

                #!/usr/bin/env bash



                {

                l_op2="" l_output2=""

                l_uidmin="$(awk '/^\s*UID_MIN/{print $2}' /etc/login.defs)"

                file_test_fix()

                {

                l_op2=""

                l_fuser="root"

                l_fgroup="root"

                if [ $(( $l_mode & $perm_mask )) -gt 0 ]; then

                l_op2="$l_op2\n - Mode: \"$l_mode\" should be \"$maxperm\" or more restrictive\n - Removing excess permissions"

                chmod "$l_rperms" "$l_fname"

                fi

                if [[ ! "$l_user" =~ $l_auser ]]; then

                l_op2="$l_op2\n - Owned by: \"$l_user\" and should be owned by \"${l_auser//|/ or }\"\n - Changing ownership to: \"$l_fuser\""

                chown "$l_fuser" "$l_fname"

                fi

                if [[ ! "$l_group" =~ $l_agroup ]]; then

                l_op2="$l_op2\n - Group owned by: \"$l_group\" and should be group owned by \"${l_agroup//|/ or }\"\n - Changing group ownership to: \"$l_fgroup\""

                chgrp "$l_fgroup" "$l_fname"

                fi

                [ -n "$l_op2" ] && l_output2="$l_output2\n - File: \"$l_fname\" is:$l_op2\n"

                }

                unset a_file && a_file=() # clear and initialize array

                # Loop to create array with stat of files that could possibly fail one of the audits

                while IFS= read -r -d $'\0' l_file; do

                [ -e "$l_file" ] && a_file+=("$(stat -Lc '%n^%#a^%U^%u^%G^%g' "$l_file")")

                done < <(find -L /var/log -type f \( -perm /0137 -o ! -user root -o ! -group root \) -print0)

                while IFS="^" read -r l_fname l_mode l_user l_uid l_group l_gid; do

                l_bname="$(basename "$l_fname")"

                case "$l_bname" in

                lastlog | lastlog.* | wtmp | wtmp.* | wtmp-* | btmp | btmp.* | btmp-* | README)

                perm_mask='0113'

                maxperm="$( printf '%o' $(( 0777 & ~$perm_mask)) )"

                l_rperms="ug-x,o-wx"

                l_auser="root"

                l_agroup="(root|utmp)"

                file_test_fix

                ;;

                secure | auth.log | syslog | messages)

                perm_mask='0137'

                maxperm="$( printf '%o' $(( 0777 & ~$perm_mask)) )"

                l_rperms="u-x,g-wx,o-rwx"

                l_auser="(root|syslog)"

                l_agroup="(root|adm)"

                file_test_fix

                ;;

                SSSD | sssd)

                perm_mask='0117'

                maxperm="$( printf '%o' $(( 0777 & ~$perm_mask)) )"

                l_rperms="ug-x,o-rwx"

                l_auser="(root|SSSD)"

                l_agroup="(root|SSSD)"

                file_test_fix

                ;;

                gdm | gdm3)

                perm_mask='0117'

                l_rperms="ug-x,o-rwx"

                maxperm="$( printf '%o' $(( 0777 & ~$perm_mask)) )"

                l_auser="root"

                l_agroup="(root|gdm|gdm3)"

                file_test_fix

                ;;

                *.journal | *.journal~)

                perm_mask='0137'

                maxperm="$( printf '%o' $(( 0777 & ~$perm_mask)) )"

                l_rperms="u-x,g-wx,o-rwx"

                l_auser="root"

                l_agroup="(root|systemd-journal)"

                file_test_fix

                ;;

                *)

                perm_mask='0137'

                maxperm="$( printf '%o' $(( 0777 & ~$perm_mask)) )"

                l_rperms="u-x,g-wx,o-rwx"

                l_auser="(root|syslog)"

                l_agroup="(root|adm)"

                if [ "$l_uid" -lt "$l_uidmin" ] && [ -z "$(awk -v grp="$l_group" -F: '$1==grp {print $4}' /etc/group)" ]; then

                if [[ ! "$l_user" =~ $l_auser ]]; then

                l_auser="(root|syslog|$l_user)"

                fi

                if [[ ! "$l_group" =~ $l_agroup ]]; then

                l_tst=""

                while l_out3="" read -r l_duid; do

                [ "$l_duid" -ge "$l_uidmin" ] && l_tst=failed

                done <<< "$(awk -F: '$4=='"$l_gid"' {print $3}' /etc/passwd)"

                [ "$l_tst" != "failed" ] && l_agroup="(root|adm|$l_group)"

                fi

                fi

                file_test_fix

                ;;

                esac

                done <<< "$(printf '%s\n' "${a_file[@]}")"

                unset a_file # Clear array

                # If all files passed, then we report no changes

                if [ -z "$l_output2" ]; then

                echo -e "- All files in \"/var/log/\" have appropriate permissions and ownership\n - No changes required\n"

                else

                # print report of changes

                echo -e "\n$l_output2"

                fi

                }

                Note: You may also need to change the configuration for your logging software or services for any logs that had incorrect permissions.

                If there are services that log to other locations, ensure that those log files have the appropriate access configured.

                Show Assessment Evidence
                Complex Check
                AND
                Script: sce/nix_logfile_access_chk.sh
                Result: Pass
                Exit Value: 101
                Output:
                • - Audit Results:
                • ** Pass **
                • - All files in "/var/log/" have appropriate permissions and ownership
                Errors:
                • /root/Assessor/sce/nix_logfile_access_chk.sh: line 83: [: : integer expression expected
                • /root/Assessor/sce/nix_logfile_access_chk.sh: line 17: & 0137 : syntax error: operand expected (error token is "& 0137 ")


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_5.1.3_Ensure_all_logfiles_have_appropriate_access_configured"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.897-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>pass</xccdf:result>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3, MP-2</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://open-scap.org/page/SCE"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="sce/nix_logfile_access_chk.sh"/>
                         <xccdf:check-content>
                            <command_result href="sce/nix_logfile_access_chk.sh"
                                            xccdf="pass"
                                            script="/root/Assessor/sce/nix_logfile_access_chk.sh"
                                            exit-value="101">
                               <out>
                                  <l/>
                                  <l>- Audit Results:</l>
                                  <l> ** Pass **</l>
                                  <l>- All files in "/var/log/" have appropriate permissions and ownership</l>
                                  <l/>
                               </out>
                               <err>
                                  <l>/root/Assessor/sce/nix_logfile_access_chk.sh: line 83: [: : integer expression expected</l>
                                  <l>/root/Assessor/sce/nix_logfile_access_chk.sh: line 17: &amp; 0137 : syntax error: operand expected (error token is "&amp; 0137 ")</l>
                               </err>
                               <env/>
                            </command_result>
                         </xccdf:check-content>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="sce">
                               <table class="evidence-sep" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td class="bold">Script:</td>
                                        <td>sce/nix_logfile_access_chk.sh</td>
                                     </tr>
                                     <tr>
                                        <td class="bold">Result:</td>
                                        <td class="pass">Pass</td>
                                     </tr>
                                     <tr>
                                        <td class="bold">Exit Value:</td>
                                        <td>101</td>
                                     </tr>
                                  </tbody>
                               </table>
                               <table class="evidence" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td class="bold">Output:</td>
                                        <td>
                                           <ul class="unstyled">
                                              <li/>
                                              <li>- Audit Results:</li>
                                              <li> ** Pass **</li>
                                              <li>- All files in "/var/log/" have appropriate permissions and ownership</li>
                                              <li/>
                                           </ul>
                                        </td>
                                     </tr>
                                  </tbody>
                               </table>
                               <table class="evidence" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td class="bold">Errors:</td>
                                        <td>
                                           <ul>
                                              <li>/root/Assessor/sce/nix_logfile_access_chk.sh: line 83: [: : integer expression expected</li>
                                              <li>/root/Assessor/sce/nix_logfile_access_chk.sh: line 17: &amp; 0137 : syntax error: operand expected (error token is "&amp; 0137 ")</li>
                                           </ul>
                                        </td>
                                     </tr>
                                  </tbody>
                               </table>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: AC-3, MP-2

                CIS Controls V7.0:

                • Control 14: Controlled Access Based on the Need to Know: -- More
                  CIS Control Information
                  Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
                  Subcontrol: 14.6
                  Label: Protect Information through Access Control Lists
                  Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
                • >

                CIS Critical Security Controls V8.0:

                • Control 3: Data Protection: -- More
                  CIS Control Information
                  Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
                  Safeguard: 3.3
                  Label: Configure Data Access Control Lists
                  Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
                  Implementation Group: IG-1
                  Security Function: Protect
                • >

                5.2 Configure System Accounting (auditd)

                The Linux Auditing System operates on a set of rules that collects certain types of system activity to facilitate incident investigation, detect unauthorized access or modification of data. By default events will be logged to /var/log/audit/audit.log , which can be configured in /etc/audit/auditd.conf .

                The following types of audit rules can be specified:

                • Control rules: Configuration of the auditing system.
                • File system rules: Allow the auditing of access to a particular file or a directory. Also known as file watches.
                • System call rules: Allow logging of system calls that any specified program makes.

                Audit rules can be set:

                • On the command line using the auditctl utility. These rules are not persistent across reboots.
                • In /etc/audit/audit.rules . These rules have to be merged and loaded before they are active.

                Notes:

                • For 64 bit systems that have arch as a rule parameter, you will need two rules: one for 64 bit and one for 32 bit systems calls. For 32 bit systems, only one rule is needed.
                • If the auditing system is configured to be locked ( -e 2 ), a system reboot will be required in order to load any changes.
                • Key names are optional on the rules and will not be used as a compliance auditing. The usage of key names is highly recommended as it facilitates organisation and searching, as such, all remediation steps will have key names supplied.
                • It is best practice to store the rules, in number prepended files, in /etc/audit/rules.d/ . Rules must end in a .rules suffix. This then requires the use of augenrules to merge all the rules into /etc/audit/audit.rules based on their their alphabetical (lexical) sort order. All benchmark recommendations follow this best practice for remediation, specifically using the prefix of 50 which is centre weighed if all rule sets make use of the number prepending naming convention.
                • Your system may have been customized to change the default UID_MIN . All samples output uses 1000 , but this value will not be used in compliance auditing. To confirm the UID_MIN for your system, run the following command: awk '/^\s*UID_MIN/{print $2}' /etc/login.defs

                Normalization

                The Audit system normalizes some entries, so when you look at the sample output keep in mind that:

                • With regards to users whose login UID is not set, the values -1 / unset / 4294967295 are equivalent and normalized to -1 .
                • When comparing field types and both sides of the comparison is valid fields types, such as euid!=uid , then the auditing system may normalize such that the output is uid!=euid .
                • Some parts of the rule may be rearranged whilst others are dependant on previous syntax. For example, the following two statements are the same:
                -a always,exit -F arch=b64 -S execve -C uid!=euid -F auid!=-1 -F key=user_emulation

                and

                -a always,exit -F arch=b64 -C euid!=uid -F auid!=unset -S execve -k user_emulation

                Capacity planning

                The recommendations in this section implement auditing policies that not only produces large quantities of logged data, but may also negatively impact system performance. Capacity planning is critical in order not to adversely impact production environments.

                • Disk space. If a significantly large set of events are captured, additional on system or off system storage may need to be allocated. If the logs are not sent to a remote log server, ensure that log rotation is implemented else the disk will fill up and the system will halt. Even when logs are sent to a log server, ensure sufficient disk space to allow caching of logs in the case of temporary network outages.
                • Disk IO. It is not just the amount of data collected that should be considered, but the rate at which logs are generated.
                • CPU overhead. System call rules might incur considerable CPU overhead. Test the systems open/close syscalls per second with and without the rules to gauge the impact of the rules.

                5.2.1 Ensure auditing is enabled

                The capturing of system events provides system administrators with information to allow them to determine if unauthorized access to their system is occurring.

                5.2.2 Configure Data Retention

                When auditing, it is important to carefully configure the storage requirements for audit logs. By default, auditd will max out the log files at 5MB and retain only 4 copies of them. Older versions will be deleted. It is possible on a system that the 20 MBs of audit logs may fill up the system causing loss of audit data. While the recommendations here provide guidance, check your site policy for audit storage requirements.

                5.2.3 Configure auditd rules

                The Audit system operates on a set of rules that define what is to be captured in the log files.

                The following types of Audit rules can be specified:

                • Control rules: Allow the Audit system's behavior and some of its configuration to be modified.
                • File system rules: Allow the auditing of access to a particular file or a directory. (Also known as file watches)
                • System call rules: Allow logging of system calls that any specified program makes.

                Audit rules can be set:

                • on the command line using the auditctl utility. Note that these rules are not persistent across reboots.
                • in a file ending in .rules in the /etc/audit/audit.d/ directory.

                5.2.4 Configure auditd file access

                Without the capability to restrict which roles and individuals can select which events are audited, unauthorized personnel may be able to prevent the auditing of critical events.

                Fail

                5.2.4.11 Ensure cryptographic mechanisms are used to protect the integrity of audit tools

                Description:

                Audit tools include, but are not limited to, vendor-provided and open source audit tools needed to successfully view and manipulate audit information system activity and records. Audit tools include custom queries and report generators.

                Protecting the integrity of the tools used for auditing purposes is a critical step toward ensuring the integrity of audit information. Audit information includes all information (e.g., audit records, audit settings, and audit reports) needed to successfully audit information system activity.

                Attackers may replace the audit tools or inject code into the existing tools with the purpose of providing the capability to hide or erase system activity from the audit logs.

                Audit tools should be cryptographically signed in order to provide the capability to identify when the audit tools have been modified, manipulated, or replaced. An example is a checksum hash of the file or files.

                Add or update the following selection lines for to a file ending in .conf in the /etc/aide/aide.conf.d/ or to /etc/aide/aide.conf to protect the integrity of the audit tools:

                # Audit Tools

                /sbin/auditctl p+i+n+u+g+s+b+acl+xattrs+sha512

                /sbin/auditd p+i+n+u+g+s+b+acl+xattrs+sha512

                /sbin/ausearch p+i+n+u+g+s+b+acl+xattrs+sha512

                /sbin/aureport p+i+n+u+g+s+b+acl+xattrs+sha512

                /sbin/autrace p+i+n+u+g+s+b+acl+xattrs+sha512

                /sbin/augenrules p+i+n+u+g+s+b+acl+xattrs+sha512

                Show Assessment Evidence
                Complex Check
                AND
                Script: sce/nix_audit_tools_cryptographic_mechanisms_chk.sh
                Result: Fail
                Exit Value: 102
                Output:
                • - Start - Determine system's package manager
                • - system is apt based
                • - system uses apt package manager
                • - End - Determine system's package manager
                • - Audit Result:
                • ** FAIL **
                • - * Reasons for audit failure * :
                • - AIDE is not installed on the system.
                No error lines were collected.


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_5.2.4.11_Ensure_cryptographic_mechanisms_are_used_to_protect_the_integrity_of_audit_tools"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.897-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>fail</xccdf:result>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AU-3</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://open-scap.org/page/SCE"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="sce/nix_audit_tools_cryptographic_mechanisms_chk.sh"/>
                         <xccdf:check-content>
                            <command_result href="sce/nix_audit_tools_cryptographic_mechanisms_chk.sh"
                                            xccdf="fail"
                                            script="/root/Assessor/sce/nix_audit_tools_cryptographic_mechanisms_chk.sh"
                                            exit-value="102">
                               <out>
                                  <l>- Start - Determine system's package manager</l>
                                  <l>- system is apt based</l>
                                  <l>- system uses apt package manager</l>
                                  <l>- End - Determine system's package manager</l>
                                  <l/>
                                  <l>- Audit Result:</l>
                                  <l>  ** FAIL **</l>
                                  <l> - * Reasons for audit failure * :</l>
                                  <l/>
                                  <l> - AIDE is not installed on the system.</l>
                                  <l/>
                                  <l/>
                                  <l/>
                               </out>
                               <err/>
                               <env/>
                            </command_result>
                         </xccdf:check-content>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="sce">
                               <table class="evidence-sep" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td class="bold">Script:</td>
                                        <td>sce/nix_audit_tools_cryptographic_mechanisms_chk.sh</td>
                                     </tr>
                                     <tr>
                                        <td class="bold">Result:</td>
                                        <td class="fail">Fail</td>
                                     </tr>
                                     <tr>
                                        <td class="bold">Exit Value:</td>
                                        <td>102</td>
                                     </tr>
                                  </tbody>
                               </table>
                               <table class="evidence" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td class="bold">Output:</td>
                                        <td>
                                           <ul class="unstyled">
                                              <li>- Start - Determine system's package manager</li>
                                              <li>- system is apt based</li>
                                              <li>- system uses apt package manager</li>
                                              <li>- End - Determine system's package manager</li>
                                              <li/>
                                              <li>- Audit Result:</li>
                                              <li>  ** FAIL **</li>
                                              <li> - * Reasons for audit failure * :</li>
                                              <li/>
                                              <li> - AIDE is not installed on the system.</li>
                                              <li/>
                                              <li/>
                                              <li/>
                                           </ul>
                                        </td>
                                     </tr>
                                  </tbody>
                               </table>
                               <table class="evidence" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td>No error lines were collected.</td>
                                     </tr>
                                  </tbody>
                               </table>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: AU-3

                6 System Maintenance

                Recommendations in this section are intended as maintenance and are intended to be checked on a frequent basis to ensure system stability. Many recommendations do not have quick remediations and require investigation into the cause and best fix available and may indicate an attempted breach of system security.

                6.1 System File Permissions

                This section provides guidance on securing aspects of system files and directories.

                Pass

                6.1.1 Ensure permissions on /etc/passwd are configured

                Description:

                The /etc/passwd file contains user account information that is used by many system utilities and therefore must be readable for these utilities to operate.

                It is critical to ensure that the /etc/passwd file is protected from unauthorized write access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.

                Run the following commands to remove excess permissions, set owner, and set group on /etc/passwd :

                # chmod u-x,go-wx /etc/passwd

                # chown root:root /etc/passwd

                Show Assessment Evidence
                Complex Check
                AND
                Criterion: Ensure at least one file named /etc/passwd exists and is owned by 0:0 and does not have permissions --x-wx-wx
                Existence Check: At Least One Exists
                Item Check: All
                Result: Pass
                File Item
                Name Type Status Value
                Filepath String Exists /etc/passwd
                Path String Exists /etc
                Filename String Exists passwd
                Type String Exists regular
                Group Id Int Exists 0
                User Id Int Exists 0
                A Time Int Exists 1713148800
                C Time Int Exists 1713148800
                M Time Int Exists 1713148800
                Size Int Exists 1426
                Suid Int Exists false
                Sgid Boolean Exists false
                Sticky Boolean Exists false
                Uread Boolean Exists true
                Uwrite Boolean Exists true
                Uexec Boolean Exists false
                Gread Boolean Exists true
                Gwrite Boolean Exists false
                Gexec Boolean Exists false
                Oread Boolean Exists true
                Owrite Boolean Exists false
                Oexec Boolean Exists false
                Has Extended Acl Boolean Not collected No Value


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_6.1.1_Ensure_permissions_on_etcpasswd_are_configured"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.898-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>pass</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3, MP-2</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995000"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995000">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995000"
                                       check="all"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure at least one file named /etc/passwd exists and is owned by 0:0 and does not have permissions --x-wx-wx</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="pass">Pass</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <caption>File Item</caption>
                                        <thead>
                                           <tr>
                                              <th scope="col">Name</th>
                                              <th scope="col">Type</th>
                                              <th scope="col">Status</th>
                                              <th scope="col">Value</th>
                                           </tr>
                                        </thead>
                                        <tbody class="tbe">
                                           <tr>
                                              <td>Filepath</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>/etc/passwd</td>
                                           </tr>
                                           <tr>
                                              <td>Path</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>/etc</td>
                                           </tr>
                                           <tr>
                                              <td>Filename</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>passwd</td>
                                           </tr>
                                           <tr>
                                              <td>Type</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>regular</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Group Id</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>0</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>User Id</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>0</td>
                                           </tr>
                                           <tr>
                                              <td>A Time</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>1713148800</td>
                                           </tr>
                                           <tr>
                                              <td>C Time</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>1713148800</td>
                                           </tr>
                                           <tr>
                                              <td>M Time</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>1713148800</td>
                                           </tr>
                                           <tr>
                                              <td>Size</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>1426</td>
                                           </tr>
                                           <tr>
                                              <td>Suid</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Sgid</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Sticky</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Uread</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>true</td>
                                           </tr>
                                           <tr>
                                              <td>Uwrite</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>true</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Uexec</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Gread</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>true</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Gwrite</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Gexec</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Oread</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>true</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Owrite</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Oexec</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Has Extended Acl</td>
                                              <td>Boolean</td>
                                              <td>Not collected</td>
                                              <td>No Value</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: AC-3, MP-2

                CIS Controls V7.0:

                • Control 14: Controlled Access Based on the Need to Know: -- More
                  CIS Control Information
                  Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
                  Subcontrol: 14.6
                  Label: Protect Information through Access Control Lists
                  Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
                • >

                CIS Critical Security Controls V8.0:

                • Control 3: Data Protection: -- More
                  CIS Control Information
                  Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
                  Safeguard: 3.3
                  Label: Configure Data Access Control Lists
                  Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
                  Implementation Group: IG-1
                  Security Function: Protect
                • >

                Pass

                6.1.2 Ensure permissions on /etc/passwd- are configured

                Description:

                The /etc/passwd- file contains backup user account information.

                It is critical to ensure that the /etc/passwd- file is protected from unauthorized access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.

                Run the following commands to remove excess permissions, set owner, and set group on /etc/passwd- :

                # chmod u-x,go-wx /etc/passwd-

                # chown root:root /etc/passwd-

                Show Assessment Evidence
                Complex Check
                AND
                Criterion: Ensure at least one file named /etc/passwd- exists and is owned by 0:0 and does not have permissions --x-wx-wx
                Existence Check: At Least One Exists
                Item Check: All
                Result: Pass
                File Item
                Name Type Status Value
                Filepath String Exists /etc/passwd-
                Path String Exists /etc
                Filename String Exists passwd-
                Type String Exists regular
                Group Id Int Exists 0
                User Id Int Exists 0
                A Time Int Exists 1706723259
                C Time Int Exists 1713148800
                M Time Int Exists 1706723259
                Size Int Exists 1359
                Suid Int Exists false
                Sgid Boolean Exists false
                Sticky Boolean Exists false
                Uread Boolean Exists true
                Uwrite Boolean Exists true
                Uexec Boolean Exists false
                Gread Boolean Exists true
                Gwrite Boolean Exists false
                Gexec Boolean Exists false
                Oread Boolean Exists true
                Owrite Boolean Exists false
                Oexec Boolean Exists false
                Has Extended Acl Boolean Not collected No Value


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_6.1.2_Ensure_permissions_on_etcpasswd-_are_configured"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.898-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>pass</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3, MP-2</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995005"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995005">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995005"
                                       check="all"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure at least one file named /etc/passwd- exists and is owned by 0:0 and does not have permissions --x-wx-wx</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="pass">Pass</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <caption>File Item</caption>
                                        <thead>
                                           <tr>
                                              <th scope="col">Name</th>
                                              <th scope="col">Type</th>
                                              <th scope="col">Status</th>
                                              <th scope="col">Value</th>
                                           </tr>
                                        </thead>
                                        <tbody class="tbe">
                                           <tr>
                                              <td>Filepath</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>/etc/passwd-</td>
                                           </tr>
                                           <tr>
                                              <td>Path</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>/etc</td>
                                           </tr>
                                           <tr>
                                              <td>Filename</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>passwd-</td>
                                           </tr>
                                           <tr>
                                              <td>Type</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>regular</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Group Id</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>0</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>User Id</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>0</td>
                                           </tr>
                                           <tr>
                                              <td>A Time</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>1706723259</td>
                                           </tr>
                                           <tr>
                                              <td>C Time</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>1713148800</td>
                                           </tr>
                                           <tr>
                                              <td>M Time</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>1706723259</td>
                                           </tr>
                                           <tr>
                                              <td>Size</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>1359</td>
                                           </tr>
                                           <tr>
                                              <td>Suid</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Sgid</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Sticky</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Uread</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>true</td>
                                           </tr>
                                           <tr>
                                              <td>Uwrite</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>true</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Uexec</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Gread</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>true</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Gwrite</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Gexec</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Oread</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>true</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Owrite</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Oexec</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Has Extended Acl</td>
                                              <td>Boolean</td>
                                              <td>Not collected</td>
                                              <td>No Value</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: AC-3, MP-2

                CIS Controls V7.0:

                • Control 14: Controlled Access Based on the Need to Know: -- More
                  CIS Control Information
                  Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
                  Subcontrol: 14.6
                  Label: Protect Information through Access Control Lists
                  Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
                • >

                CIS Critical Security Controls V8.0:

                • Control 3: Data Protection: -- More
                  CIS Control Information
                  Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
                  Safeguard: 3.3
                  Label: Configure Data Access Control Lists
                  Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
                  Implementation Group: IG-1
                  Security Function: Protect
                • >

                Pass

                6.1.3 Ensure permissions on /etc/group are configured

                Description:

                The /etc/group file contains a list of all the valid groups defined in the system. The command below allows read/write access for root and read access for everyone else.

                The /etc/group file needs to be protected from unauthorized changes by non-privileged users, but needs to be readable as this information is used with many non-privileged programs.

                Run the following commands to remove excess permissions, set owner, and set group on /etc/group :

                # chmod u-x,go-wx /etc/group

                # chown root:root /etc/group

                Show Assessment Evidence
                Complex Check
                AND
                Criterion: Ensure at least one file named /etc/group exists and is owned by 0:0 and does not have permissions --x-wx-wx
                Existence Check: At Least One Exists
                Item Check: All
                Result: Pass
                File Item
                Name Type Status Value
                Filepath String Exists /etc/group
                Path String Exists /etc
                Filename String Exists group
                Type String Exists regular
                Group Id Int Exists 0
                User Id Int Exists 0
                A Time Int Exists 1713148800
                C Time Int Exists 1713148800
                M Time Int Exists 1713148800
                Size Int Exists 693
                Suid Int Exists false
                Sgid Boolean Exists false
                Sticky Boolean Exists false
                Uread Boolean Exists true
                Uwrite Boolean Exists true
                Uexec Boolean Exists false
                Gread Boolean Exists true
                Gwrite Boolean Exists false
                Gexec Boolean Exists false
                Oread Boolean Exists true
                Owrite Boolean Exists false
                Oexec Boolean Exists false
                Has Extended Acl Boolean Not collected No Value


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_6.1.3_Ensure_permissions_on_etcgroup_are_configured"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.898-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>pass</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3, MP-2</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995011"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995011">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995011"
                                       check="all"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure at least one file named /etc/group exists and is owned by 0:0 and does not have permissions --x-wx-wx</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="pass">Pass</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <caption>File Item</caption>
                                        <thead>
                                           <tr>
                                              <th scope="col">Name</th>
                                              <th scope="col">Type</th>
                                              <th scope="col">Status</th>
                                              <th scope="col">Value</th>
                                           </tr>
                                        </thead>
                                        <tbody class="tbe">
                                           <tr>
                                              <td>Filepath</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>/etc/group</td>
                                           </tr>
                                           <tr>
                                              <td>Path</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>/etc</td>
                                           </tr>
                                           <tr>
                                              <td>Filename</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>group</td>
                                           </tr>
                                           <tr>
                                              <td>Type</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>regular</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Group Id</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>0</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>User Id</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>0</td>
                                           </tr>
                                           <tr>
                                              <td>A Time</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>1713148800</td>
                                           </tr>
                                           <tr>
                                              <td>C Time</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>1713148800</td>
                                           </tr>
                                           <tr>
                                              <td>M Time</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>1713148800</td>
                                           </tr>
                                           <tr>
                                              <td>Size</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>693</td>
                                           </tr>
                                           <tr>
                                              <td>Suid</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Sgid</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Sticky</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Uread</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>true</td>
                                           </tr>
                                           <tr>
                                              <td>Uwrite</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>true</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Uexec</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Gread</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>true</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Gwrite</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Gexec</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Oread</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>true</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Owrite</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Oexec</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Has Extended Acl</td>
                                              <td>Boolean</td>
                                              <td>Not collected</td>
                                              <td>No Value</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: AC-3, MP-2

                CIS Controls V7.0:

                • Control 14: Controlled Access Based on the Need to Know: -- More
                  CIS Control Information
                  Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
                  Subcontrol: 14.6
                  Label: Protect Information through Access Control Lists
                  Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
                • >

                CIS Critical Security Controls V8.0:

                • Control 3: Data Protection: -- More
                  CIS Control Information
                  Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
                  Safeguard: 3.3
                  Label: Configure Data Access Control Lists
                  Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
                  Implementation Group: IG-1
                  Security Function: Protect
                • >

                Pass

                6.1.4 Ensure permissions on /etc/group- are configured

                Description:

                The /etc/group- file contains a backup list of all the valid groups defined in the system.

                It is critical to ensure that the /etc/group- file is protected from unauthorized access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.

                Run the following commands to remove excess permissions, set owner, and set group on /etc/group- :

                # chmod u-x,go-wx /etc/group-

                # chown root:root /etc/group-

                Show Assessment Evidence
                Complex Check
                AND
                Criterion: Ensure at least one file named /etc/group- exists and is owned by 0:0 and does not have permissions --x-wx-wx
                Existence Check: At Least One Exists
                Item Check: All
                Result: Pass
                File Item
                Name Type Status Value
                Filepath String Exists /etc/group-
                Path String Exists /etc
                Filename String Exists group-
                Type String Exists regular
                Group Id Int Exists 0
                User Id Int Exists 0
                A Time Int Exists 1706723259
                C Time Int Exists 1713148800
                M Time Int Exists 1706723259
                Size Int Exists 669
                Suid Int Exists false
                Sgid Boolean Exists false
                Sticky Boolean Exists false
                Uread Boolean Exists true
                Uwrite Boolean Exists true
                Uexec Boolean Exists false
                Gread Boolean Exists true
                Gwrite Boolean Exists false
                Gexec Boolean Exists false
                Oread Boolean Exists true
                Owrite Boolean Exists false
                Oexec Boolean Exists false
                Has Extended Acl Boolean Not collected No Value


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_6.1.4_Ensure_permissions_on_etcgroup-_are_configured"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.898-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>pass</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3, MP-2</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995018"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995018">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995018"
                                       check="all"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure at least one file named /etc/group- exists and is owned by 0:0 and does not have permissions --x-wx-wx</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="pass">Pass</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <caption>File Item</caption>
                                        <thead>
                                           <tr>
                                              <th scope="col">Name</th>
                                              <th scope="col">Type</th>
                                              <th scope="col">Status</th>
                                              <th scope="col">Value</th>
                                           </tr>
                                        </thead>
                                        <tbody class="tbe">
                                           <tr>
                                              <td>Filepath</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>/etc/group-</td>
                                           </tr>
                                           <tr>
                                              <td>Path</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>/etc</td>
                                           </tr>
                                           <tr>
                                              <td>Filename</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>group-</td>
                                           </tr>
                                           <tr>
                                              <td>Type</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>regular</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Group Id</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>0</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>User Id</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>0</td>
                                           </tr>
                                           <tr>
                                              <td>A Time</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>1706723259</td>
                                           </tr>
                                           <tr>
                                              <td>C Time</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>1713148800</td>
                                           </tr>
                                           <tr>
                                              <td>M Time</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>1706723259</td>
                                           </tr>
                                           <tr>
                                              <td>Size</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>669</td>
                                           </tr>
                                           <tr>
                                              <td>Suid</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Sgid</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Sticky</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Uread</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>true</td>
                                           </tr>
                                           <tr>
                                              <td>Uwrite</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>true</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Uexec</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Gread</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>true</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Gwrite</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Gexec</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Oread</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>true</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Owrite</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Oexec</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Has Extended Acl</td>
                                              <td>Boolean</td>
                                              <td>Not collected</td>
                                              <td>No Value</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: AC-3, MP-2

                CIS Controls V7.0:

                • Control 14: Controlled Access Based on the Need to Know: -- More
                  CIS Control Information
                  Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
                  Subcontrol: 14.6
                  Label: Protect Information through Access Control Lists
                  Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
                • >

                CIS Critical Security Controls V8.0:

                • Control 3: Data Protection: -- More
                  CIS Control Information
                  Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
                  Safeguard: 3.3
                  Label: Configure Data Access Control Lists
                  Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
                  Implementation Group: IG-1
                  Security Function: Protect
                • >

                Pass

                6.1.5 Ensure permissions on /etc/shadow are configured

                Description:

                The /etc/shadow file is used to store the information about user accounts that is critical to the security of those accounts, such as the hashed password and other security information.

                If attackers can gain read access to the /etc/shadow file, they can easily run a password cracking program against the hashed password to break it. Other security information that is stored in the /etc/shadow file (such as expiration) could also be useful to subvert the user accounts.

                Run one of the following commands to set ownership of /etc/shadow to root and group to either root or shadow :

                # chown root:shadow /etc/shadow

                -OR-

                # chown root:root /etc/shadow

                Run the following command to remove excess permissions form /etc/shadow :

                # chmod u-x,g-wx,o-rwx /etc/shadow

                Show Assessment Evidence
                Complex Check
                AND
                Complex Check
                AND
                Script: sce/nix_mode_chk.sh
                Result: Pass
                Exit Value: 101
                Output:
                • - Audit Result:
                • ** PASS **
                • - file: "/etc/shadow" is mode: "0640" (should be mode: "640" or more restrictive)
                No error lines were collected.
                Script: sce/nix_owner_chk.sh
                Result: Pass
                Exit Value: 101
                Output:
                • - Audit Result:
                • ** PASS **
                • - file: "/etc/shadow" is owned by: "root" (should be owned by: "root")
                No error lines were collected.
                Script: sce/nix_group_chk.sh
                Result: Pass
                Exit Value: 101
                Output:
                • - Audit Result:
                • ** PASS **
                • - file: "/etc/shadow" is group owned by: "shadow" (should be group owned by: "(root or shadow)")
                No error lines were collected.


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_6.1.5_Ensure_permissions_on_etcshadow_are_configured"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.898-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>pass</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3, MP-2</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:complex-check operator="AND" negate="false">
                         <xccdf:check system="http://open-scap.org/page/SCE"
                                      negate="false"
                                      multi-check="false">
                            <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                                value-id="xccdf_org.cisecurity.benchmarks_value_3995026_var"/>
                            <xccdf:check-content-ref href="sce/nix_mode_chk.sh"/>
                            <xccdf:check-content>
                               <command_result href="sce/nix_mode_chk.sh"
                                               xccdf="pass"
                                               script="/root/Assessor/sce/nix_mode_chk.sh"
                                               exit-value="101">
                                  <out>
                                     <l/>
                                     <l>- Audit Result:</l>
                                     <l>  ** PASS **</l>
                                     <l> - file: "/etc/shadow" is mode: "0640" (should be mode: "640" or more restrictive)</l>
                                  </out>
                                  <err/>
                                  <env/>
                               </command_result>
                            </xccdf:check-content>
                            <evidence xmlns="http://cisecurity.org/evidence">
                               <div class="sce">
                                  <table class="evidence-sep" width="100%">
                                     <tbody class="tbe">
                                        <tr>
                                           <td class="bold">Script:</td>
                                           <td>sce/nix_mode_chk.sh</td>
                                        </tr>
                                        <tr>
                                           <td class="bold">Result:</td>
                                           <td class="pass">Pass</td>
                                        </tr>
                                        <tr>
                                           <td class="bold">Exit Value:</td>
                                           <td>101</td>
                                        </tr>
                                     </tbody>
                                  </table>
                                  <table class="evidence" width="100%">
                                     <tbody class="tbe">
                                        <tr>
                                           <td class="bold">Output:</td>
                                           <td>
                                              <ul class="unstyled">
                                                 <li/>
                                                 <li>- Audit Result:</li>
                                                 <li>  ** PASS **</li>
                                                 <li> - file: "/etc/shadow" is mode: "0640" (should be mode: "640" or more restrictive)</li>
                                              </ul>
                                           </td>
                                        </tr>
                                     </tbody>
                                  </table>
                                  <table class="evidence" width="100%">
                                     <tbody class="tbe">
                                        <tr>
                                           <td>No error lines were collected.</td>
                                        </tr>
                                     </tbody>
                                  </table>
                               </div>
                            </evidence>
                         </xccdf:check>
                         <xccdf:check system="http://open-scap.org/page/SCE"
                                      negate="false"
                                      multi-check="false">
                            <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                                value-id="xccdf_org.cisecurity.benchmarks_value_3995028_var"/>
                            <xccdf:check-content-ref href="sce/nix_owner_chk.sh"/>
                            <xccdf:check-content>
                               <command_result href="sce/nix_owner_chk.sh"
                                               xccdf="pass"
                                               script="/root/Assessor/sce/nix_owner_chk.sh"
                                               exit-value="101">
                                  <out>
                                     <l/>
                                     <l>- Audit Result:</l>
                                     <l>  ** PASS **</l>
                                     <l> - file: "/etc/shadow" is owned by: "root" (should be owned by: "root")</l>
                                  </out>
                                  <err/>
                                  <env/>
                               </command_result>
                            </xccdf:check-content>
                            <evidence xmlns="http://cisecurity.org/evidence">
                               <div class="sce">
                                  <table class="evidence-sep" width="100%">
                                     <tbody class="tbe">
                                        <tr>
                                           <td class="bold">Script:</td>
                                           <td>sce/nix_owner_chk.sh</td>
                                        </tr>
                                        <tr>
                                           <td class="bold">Result:</td>
                                           <td class="pass">Pass</td>
                                        </tr>
                                        <tr>
                                           <td class="bold">Exit Value:</td>
                                           <td>101</td>
                                        </tr>
                                     </tbody>
                                  </table>
                                  <table class="evidence" width="100%">
                                     <tbody class="tbe">
                                        <tr>
                                           <td class="bold">Output:</td>
                                           <td>
                                              <ul class="unstyled">
                                                 <li/>
                                                 <li>- Audit Result:</li>
                                                 <li>  ** PASS **</li>
                                                 <li> - file: "/etc/shadow" is owned by: "root" (should be owned by: "root")</li>
                                              </ul>
                                           </td>
                                        </tr>
                                     </tbody>
                                  </table>
                                  <table class="evidence" width="100%">
                                     <tbody class="tbe">
                                        <tr>
                                           <td>No error lines were collected.</td>
                                        </tr>
                                     </tbody>
                                  </table>
                               </div>
                            </evidence>
                         </xccdf:check>
                      </xccdf:complex-check>
                      <xccdf:check system="http://open-scap.org/page/SCE"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                             value-id="xccdf_org.cisecurity.benchmarks_value_3995031_var"/>
                         <xccdf:check-content-ref href="sce/nix_group_chk.sh"/>
                         <xccdf:check-content>
                            <command_result href="sce/nix_group_chk.sh"
                                            xccdf="pass"
                                            script="/root/Assessor/sce/nix_group_chk.sh"
                                            exit-value="101">
                               <out>
                                  <l/>
                                  <l>- Audit Result:</l>
                                  <l>  ** PASS **</l>
                                  <l> - file: "/etc/shadow" is group owned by: "shadow" (should be group owned by: "(root or shadow)")</l>
                               </out>
                               <err/>
                               <env/>
                            </command_result>
                         </xccdf:check-content>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="sce">
                               <table class="evidence-sep" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td class="bold">Script:</td>
                                        <td>sce/nix_group_chk.sh</td>
                                     </tr>
                                     <tr>
                                        <td class="bold">Result:</td>
                                        <td class="pass">Pass</td>
                                     </tr>
                                     <tr>
                                        <td class="bold">Exit Value:</td>
                                        <td>101</td>
                                     </tr>
                                  </tbody>
                               </table>
                               <table class="evidence" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td class="bold">Output:</td>
                                        <td>
                                           <ul class="unstyled">
                                              <li/>
                                              <li>- Audit Result:</li>
                                              <li>  ** PASS **</li>
                                              <li> - file: "/etc/shadow" is group owned by: "shadow" (should be group owned by: "(root or shadow)")</li>
                                           </ul>
                                        </td>
                                     </tr>
                                  </tbody>
                               </table>
                               <table class="evidence" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td>No error lines were collected.</td>
                                     </tr>
                                  </tbody>
                               </table>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: AC-3, MP-2

                CIS Controls V7.0:

                • Control 14: Controlled Access Based on the Need to Know: -- More
                  CIS Control Information
                  Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
                  Subcontrol: 14.6
                  Label: Protect Information through Access Control Lists
                  Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
                • >

                CIS Critical Security Controls V8.0:

                • Control 3: Data Protection: -- More
                  CIS Control Information
                  Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
                  Safeguard: 3.3
                  Label: Configure Data Access Control Lists
                  Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
                  Implementation Group: IG-1
                  Security Function: Protect
                • >

                Pass

                6.1.6 Ensure permissions on /etc/shadow- are configured

                Description:

                The /etc/shadow- file is used to store backup information about user accounts that is critical to the security of those accounts, such as the hashed password and other security information.

                It is critical to ensure that the /etc/shadow- file is protected from unauthorized access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.

                Run one of the following commands to set ownership of /etc/shadow- to root and group to either root or shadow :

                # chown root:shadow /etc/shadow-

                -OR-

                # chown root:root /etc/shadow-

                Run the following command to remove excess permissions form /etc/shadow- :

                # chmod u-x,g-wx,o-rwx /etc/shadow-

                Show Assessment Evidence
                Complex Check
                AND
                Complex Check
                AND
                Script: sce/nix_mode_chk.sh
                Result: Pass
                Exit Value: 101
                Output:
                • - Audit Result:
                • ** PASS **
                • - file: "/etc/shadow" is mode: "0640" (should be mode: "640" or more restrictive)
                No error lines were collected.
                Script: sce/nix_owner_chk.sh
                Result: Pass
                Exit Value: 101
                Output:
                • - Audit Result:
                • ** PASS **
                • - file: "/etc/shadow" is owned by: "root" (should be owned by: "root")
                No error lines were collected.
                Script: sce/nix_group_chk.sh
                Result: Pass
                Exit Value: 101
                Output:
                • - Audit Result:
                • ** PASS **
                • - file: "/etc/shadow" is group owned by: "shadow" (should be group owned by: "(root or shadow)")
                No error lines were collected.


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_6.1.6_Ensure_permissions_on_etcshadow-_are_configured"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.898-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>pass</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3, MP-2</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:complex-check operator="AND" negate="false">
                         <xccdf:check system="http://open-scap.org/page/SCE"
                                      negate="false"
                                      multi-check="false">
                            <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                                value-id="xccdf_org.cisecurity.benchmarks_value_3995036_var"/>
                            <xccdf:check-content-ref href="sce/nix_mode_chk.sh"/>
                            <xccdf:check-content>
                               <command_result href="sce/nix_mode_chk.sh"
                                               xccdf="pass"
                                               script="/root/Assessor/sce/nix_mode_chk.sh"
                                               exit-value="101">
                                  <out>
                                     <l/>
                                     <l>- Audit Result:</l>
                                     <l>  ** PASS **</l>
                                     <l> - file: "/etc/shadow" is mode: "0640" (should be mode: "640" or more restrictive)</l>
                                  </out>
                                  <err/>
                                  <env/>
                               </command_result>
                            </xccdf:check-content>
                            <evidence xmlns="http://cisecurity.org/evidence">
                               <div class="sce">
                                  <table class="evidence-sep" width="100%">
                                     <tbody class="tbe">
                                        <tr>
                                           <td class="bold">Script:</td>
                                           <td>sce/nix_mode_chk.sh</td>
                                        </tr>
                                        <tr>
                                           <td class="bold">Result:</td>
                                           <td class="pass">Pass</td>
                                        </tr>
                                        <tr>
                                           <td class="bold">Exit Value:</td>
                                           <td>101</td>
                                        </tr>
                                     </tbody>
                                  </table>
                                  <table class="evidence" width="100%">
                                     <tbody class="tbe">
                                        <tr>
                                           <td class="bold">Output:</td>
                                           <td>
                                              <ul class="unstyled">
                                                 <li/>
                                                 <li>- Audit Result:</li>
                                                 <li>  ** PASS **</li>
                                                 <li> - file: "/etc/shadow" is mode: "0640" (should be mode: "640" or more restrictive)</li>
                                              </ul>
                                           </td>
                                        </tr>
                                     </tbody>
                                  </table>
                                  <table class="evidence" width="100%">
                                     <tbody class="tbe">
                                        <tr>
                                           <td>No error lines were collected.</td>
                                        </tr>
                                     </tbody>
                                  </table>
                               </div>
                            </evidence>
                         </xccdf:check>
                         <xccdf:check system="http://open-scap.org/page/SCE"
                                      negate="false"
                                      multi-check="false">
                            <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                                value-id="xccdf_org.cisecurity.benchmarks_value_3995039_var"/>
                            <xccdf:check-content-ref href="sce/nix_owner_chk.sh"/>
                            <xccdf:check-content>
                               <command_result href="sce/nix_owner_chk.sh"
                                               xccdf="pass"
                                               script="/root/Assessor/sce/nix_owner_chk.sh"
                                               exit-value="101">
                                  <out>
                                     <l/>
                                     <l>- Audit Result:</l>
                                     <l>  ** PASS **</l>
                                     <l> - file: "/etc/shadow" is owned by: "root" (should be owned by: "root")</l>
                                  </out>
                                  <err/>
                                  <env/>
                               </command_result>
                            </xccdf:check-content>
                            <evidence xmlns="http://cisecurity.org/evidence">
                               <div class="sce">
                                  <table class="evidence-sep" width="100%">
                                     <tbody class="tbe">
                                        <tr>
                                           <td class="bold">Script:</td>
                                           <td>sce/nix_owner_chk.sh</td>
                                        </tr>
                                        <tr>
                                           <td class="bold">Result:</td>
                                           <td class="pass">Pass</td>
                                        </tr>
                                        <tr>
                                           <td class="bold">Exit Value:</td>
                                           <td>101</td>
                                        </tr>
                                     </tbody>
                                  </table>
                                  <table class="evidence" width="100%">
                                     <tbody class="tbe">
                                        <tr>
                                           <td class="bold">Output:</td>
                                           <td>
                                              <ul class="unstyled">
                                                 <li/>
                                                 <li>- Audit Result:</li>
                                                 <li>  ** PASS **</li>
                                                 <li> - file: "/etc/shadow" is owned by: "root" (should be owned by: "root")</li>
                                              </ul>
                                           </td>
                                        </tr>
                                     </tbody>
                                  </table>
                                  <table class="evidence" width="100%">
                                     <tbody class="tbe">
                                        <tr>
                                           <td>No error lines were collected.</td>
                                        </tr>
                                     </tbody>
                                  </table>
                               </div>
                            </evidence>
                         </xccdf:check>
                      </xccdf:complex-check>
                      <xccdf:check system="http://open-scap.org/page/SCE"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                             value-id="xccdf_org.cisecurity.benchmarks_value_3995041_var"/>
                         <xccdf:check-content-ref href="sce/nix_group_chk.sh"/>
                         <xccdf:check-content>
                            <command_result href="sce/nix_group_chk.sh"
                                            xccdf="pass"
                                            script="/root/Assessor/sce/nix_group_chk.sh"
                                            exit-value="101">
                               <out>
                                  <l/>
                                  <l>- Audit Result:</l>
                                  <l>  ** PASS **</l>
                                  <l> - file: "/etc/shadow" is group owned by: "shadow" (should be group owned by: "(root or shadow)")</l>
                               </out>
                               <err/>
                               <env/>
                            </command_result>
                         </xccdf:check-content>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="sce">
                               <table class="evidence-sep" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td class="bold">Script:</td>
                                        <td>sce/nix_group_chk.sh</td>
                                     </tr>
                                     <tr>
                                        <td class="bold">Result:</td>
                                        <td class="pass">Pass</td>
                                     </tr>
                                     <tr>
                                        <td class="bold">Exit Value:</td>
                                        <td>101</td>
                                     </tr>
                                  </tbody>
                               </table>
                               <table class="evidence" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td class="bold">Output:</td>
                                        <td>
                                           <ul class="unstyled">
                                              <li/>
                                              <li>- Audit Result:</li>
                                              <li>  ** PASS **</li>
                                              <li> - file: "/etc/shadow" is group owned by: "shadow" (should be group owned by: "(root or shadow)")</li>
                                           </ul>
                                        </td>
                                     </tr>
                                  </tbody>
                               </table>
                               <table class="evidence" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td>No error lines were collected.</td>
                                     </tr>
                                  </tbody>
                               </table>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: AC-3, MP-2

                CIS Controls V7.0:

                • Control 14: Controlled Access Based on the Need to Know: -- More
                  CIS Control Information
                  Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
                  Subcontrol: 14.6
                  Label: Protect Information through Access Control Lists
                  Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
                • >

                CIS Critical Security Controls V8.0:

                • Control 3: Data Protection: -- More
                  CIS Control Information
                  Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
                  Safeguard: 3.3
                  Label: Configure Data Access Control Lists
                  Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
                  Implementation Group: IG-1
                  Security Function: Protect
                • >

                Pass

                6.1.7 Ensure permissions on /etc/gshadow are configured

                Description:

                The /etc/gshadow file is used to store the information about groups that is critical to the security of those accounts, such as the hashed password and other security information.

                If attackers can gain read access to the /etc/gshadow file, they can easily run a password cracking program against the hashed password to break it. Other security information that is stored in the /etc/gshadow file (such as group administrators) could also be useful to subvert the group.

                Run one of the following commands to set ownership of /etc/gshadow to root and group to either root or shadow :

                # chown root:shadow /etc/gshadow

                -OR-

                # chown root:root /etc/gshadow

                Run the following command to remove excess permissions form /etc/gshadow :

                # chmod u-x,g-wx,o-rwx /etc/gshadow

                Show Assessment Evidence
                Complex Check
                AND
                Criterion: Ensure at least one file named /etc/gshadow exists and is owned by user 0 and does not have permissions --x-wxrwx
                Existence Check: At Least One Exists
                Item Check: All
                Result: Pass
                File Item
                Name Type Status Value
                Filepath String Exists /etc/gshadow
                Path String Exists /etc
                Filename String Exists gshadow
                Type String Exists regular
                Group Id Int Exists 42
                User Id Int Exists 0
                A Time Int Exists 1713148800
                C Time Int Exists 1713148800
                M Time Int Exists 1713148800
                Size Int Exists 578
                Suid Int Exists false
                Sgid Boolean Exists false
                Sticky Boolean Exists false
                Uread Boolean Exists true
                Uwrite Boolean Exists true
                Uexec Boolean Exists false
                Gread Boolean Exists true
                Gwrite Boolean Exists false
                Gexec Boolean Exists false
                Oread Boolean Exists false
                Owrite Boolean Exists false
                Oexec Boolean Exists false
                Has Extended Acl Boolean Not collected No Value
                Script: sce/nix_group_chk.sh
                Result: Pass
                Exit Value: 101
                Output:
                • - Audit Result:
                • ** PASS **
                • - file: "/etc/gshadow" is group owned by: "shadow" (should be group owned by: "(shadow or root)")
                No error lines were collected.


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_6.1.7_Ensure_permissions_on_etcgshadow_are_configured"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.898-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>pass</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3, MP-2</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995044"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995044">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995044"
                                       check="all"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure at least one file named /etc/gshadow exists and is owned by user 0 and does not have permissions --x-wxrwx</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="pass">Pass</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <caption>File Item</caption>
                                        <thead>
                                           <tr>
                                              <th scope="col">Name</th>
                                              <th scope="col">Type</th>
                                              <th scope="col">Status</th>
                                              <th scope="col">Value</th>
                                           </tr>
                                        </thead>
                                        <tbody class="tbe">
                                           <tr>
                                              <td>Filepath</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>/etc/gshadow</td>
                                           </tr>
                                           <tr>
                                              <td>Path</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>/etc</td>
                                           </tr>
                                           <tr>
                                              <td>Filename</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>gshadow</td>
                                           </tr>
                                           <tr>
                                              <td>Type</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>regular</td>
                                           </tr>
                                           <tr>
                                              <td>Group Id</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>42</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>User Id</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>0</td>
                                           </tr>
                                           <tr>
                                              <td>A Time</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>1713148800</td>
                                           </tr>
                                           <tr>
                                              <td>C Time</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>1713148800</td>
                                           </tr>
                                           <tr>
                                              <td>M Time</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>1713148800</td>
                                           </tr>
                                           <tr>
                                              <td>Size</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>578</td>
                                           </tr>
                                           <tr>
                                              <td>Suid</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Sgid</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Sticky</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Uread</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>true</td>
                                           </tr>
                                           <tr>
                                              <td>Uwrite</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>true</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Uexec</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Gread</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>true</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Gwrite</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Gexec</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Oread</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Owrite</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Oexec</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Has Extended Acl</td>
                                              <td>Boolean</td>
                                              <td>Not collected</td>
                                              <td>No Value</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                      <xccdf:check system="http://open-scap.org/page/SCE"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                             value-id="xccdf_org.cisecurity.benchmarks_value_3995052_var"/>
                         <xccdf:check-content-ref href="sce/nix_group_chk.sh"/>
                         <xccdf:check-content>
                            <command_result href="sce/nix_group_chk.sh"
                                            xccdf="pass"
                                            script="/root/Assessor/sce/nix_group_chk.sh"
                                            exit-value="101">
                               <out>
                                  <l/>
                                  <l>- Audit Result:</l>
                                  <l>  ** PASS **</l>
                                  <l> - file: "/etc/gshadow" is group owned by: "shadow" (should be group owned by: "(shadow or root)")</l>
                               </out>
                               <err/>
                               <env/>
                            </command_result>
                         </xccdf:check-content>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="sce">
                               <table class="evidence-sep" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td class="bold">Script:</td>
                                        <td>sce/nix_group_chk.sh</td>
                                     </tr>
                                     <tr>
                                        <td class="bold">Result:</td>
                                        <td class="pass">Pass</td>
                                     </tr>
                                     <tr>
                                        <td class="bold">Exit Value:</td>
                                        <td>101</td>
                                     </tr>
                                  </tbody>
                               </table>
                               <table class="evidence" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td class="bold">Output:</td>
                                        <td>
                                           <ul class="unstyled">
                                              <li/>
                                              <li>- Audit Result:</li>
                                              <li>  ** PASS **</li>
                                              <li> - file: "/etc/gshadow" is group owned by: "shadow" (should be group owned by: "(shadow or root)")</li>
                                           </ul>
                                        </td>
                                     </tr>
                                  </tbody>
                               </table>
                               <table class="evidence" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td>No error lines were collected.</td>
                                     </tr>
                                  </tbody>
                               </table>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: AC-3, MP-2

                CIS Controls V7.0:

                • Control 14: Controlled Access Based on the Need to Know: -- More
                  CIS Control Information
                  Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
                  Subcontrol: 14.6
                  Label: Protect Information through Access Control Lists
                  Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
                • >

                CIS Critical Security Controls V8.0:

                • Control 3: Data Protection: -- More
                  CIS Control Information
                  Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
                  Safeguard: 3.3
                  Label: Configure Data Access Control Lists
                  Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
                  Implementation Group: IG-1
                  Security Function: Protect
                • >

                Pass

                6.1.8 Ensure permissions on /etc/gshadow- are configured

                Description:

                The /etc/gshadow- file is used to store backup information about groups that is critical to the security of those accounts, such as the hashed password and other security information.

                It is critical to ensure that the /etc/gshadow- file is protected from unauthorized access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.

                Run one of the following commands to set ownership of /etc/gshadow- to root and group to either root or shadow :

                # chown root:shadow /etc/gshadow-

                -OR-

                # chown root:root /etc/gshadow-

                Run the following command to remove excess permissions form /etc/gshadow- :

                # chmod u-x,g-wx,o-rwx /etc/gshadow-

                Show Assessment Evidence
                Complex Check
                AND
                Criterion: Ensure at least one file named /etc/gshadow- exists and is owned by user 0 and does not have permissions --x-wxrwx SUID SGID sticky
                Existence Check: At Least One Exists
                Item Check: All
                Result: Pass
                File Item
                Name Type Status Value
                Filepath String Exists /etc/gshadow-
                Path String Exists /etc
                Filename String Exists gshadow-
                Type String Exists regular
                Group Id Int Exists 42
                User Id Int Exists 0
                A Time Int Exists 1706723259
                C Time Int Exists 1713148800
                M Time Int Exists 1706723259
                Size Int Exists 556
                Suid Int Exists false
                Sgid Boolean Exists false
                Sticky Boolean Exists false
                Uread Boolean Exists true
                Uwrite Boolean Exists true
                Uexec Boolean Exists false
                Gread Boolean Exists true
                Gwrite Boolean Exists false
                Gexec Boolean Exists false
                Oread Boolean Exists false
                Owrite Boolean Exists false
                Oexec Boolean Exists false
                Has Extended Acl Boolean Not collected No Value
                Script: sce/nix_group_chk.sh
                Result: Pass
                Exit Value: 101
                Output:
                • - Audit Result:
                • ** PASS **
                • - file: "/etc/shadow" is group owned by: "shadow" (should be group owned by: "(shadow or root)")
                No error lines were collected.


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_6.1.8_Ensure_permissions_on_etcgshadow-_are_configured"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.898-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>pass</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3, MP-2</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995055"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995055">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995055"
                                       check="all"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure at least one file named /etc/gshadow- exists and is owned by user 0 and does not have permissions --x-wxrwx SUID SGID sticky</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="pass">Pass</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <caption>File Item</caption>
                                        <thead>
                                           <tr>
                                              <th scope="col">Name</th>
                                              <th scope="col">Type</th>
                                              <th scope="col">Status</th>
                                              <th scope="col">Value</th>
                                           </tr>
                                        </thead>
                                        <tbody class="tbe">
                                           <tr>
                                              <td>Filepath</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>/etc/gshadow-</td>
                                           </tr>
                                           <tr>
                                              <td>Path</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>/etc</td>
                                           </tr>
                                           <tr>
                                              <td>Filename</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>gshadow-</td>
                                           </tr>
                                           <tr>
                                              <td>Type</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>regular</td>
                                           </tr>
                                           <tr>
                                              <td>Group Id</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>42</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>User Id</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>0</td>
                                           </tr>
                                           <tr>
                                              <td>A Time</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>1706723259</td>
                                           </tr>
                                           <tr>
                                              <td>C Time</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>1713148800</td>
                                           </tr>
                                           <tr>
                                              <td>M Time</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>1706723259</td>
                                           </tr>
                                           <tr>
                                              <td>Size</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>556</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Suid</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Sgid</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Sticky</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Uread</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>true</td>
                                           </tr>
                                           <tr>
                                              <td>Uwrite</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>true</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Uexec</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Gread</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>true</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Gwrite</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Gexec</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Oread</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Owrite</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Oexec</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Has Extended Acl</td>
                                              <td>Boolean</td>
                                              <td>Not collected</td>
                                              <td>No Value</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                      <xccdf:check system="http://open-scap.org/page/SCE"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-export export-name="XCCDF_VALUE_REGEX"
                                             value-id="xccdf_org.cisecurity.benchmarks_value_3995063_var"/>
                         <xccdf:check-content-ref href="sce/nix_group_chk.sh"/>
                         <xccdf:check-content>
                            <command_result href="sce/nix_group_chk.sh"
                                            xccdf="pass"
                                            script="/root/Assessor/sce/nix_group_chk.sh"
                                            exit-value="101">
                               <out>
                                  <l/>
                                  <l>- Audit Result:</l>
                                  <l>  ** PASS **</l>
                                  <l> - file: "/etc/shadow" is group owned by: "shadow" (should be group owned by: "(shadow or root)")</l>
                               </out>
                               <err/>
                               <env/>
                            </command_result>
                         </xccdf:check-content>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="sce">
                               <table class="evidence-sep" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td class="bold">Script:</td>
                                        <td>sce/nix_group_chk.sh</td>
                                     </tr>
                                     <tr>
                                        <td class="bold">Result:</td>
                                        <td class="pass">Pass</td>
                                     </tr>
                                     <tr>
                                        <td class="bold">Exit Value:</td>
                                        <td>101</td>
                                     </tr>
                                  </tbody>
                               </table>
                               <table class="evidence" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td class="bold">Output:</td>
                                        <td>
                                           <ul class="unstyled">
                                              <li/>
                                              <li>- Audit Result:</li>
                                              <li>  ** PASS **</li>
                                              <li> - file: "/etc/shadow" is group owned by: "shadow" (should be group owned by: "(shadow or root)")</li>
                                           </ul>
                                        </td>
                                     </tr>
                                  </tbody>
                               </table>
                               <table class="evidence" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td>No error lines were collected.</td>
                                     </tr>
                                  </tbody>
                               </table>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: AC-3, MP-2

                CIS Controls V7.0:

                • Control 14: Controlled Access Based on the Need to Know: -- More
                  CIS Control Information
                  Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
                  Subcontrol: 14.6
                  Label: Protect Information through Access Control Lists
                  Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
                • >

                CIS Critical Security Controls V8.0:

                • Control 3: Data Protection: -- More
                  CIS Control Information
                  Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
                  Safeguard: 3.3
                  Label: Configure Data Access Control Lists
                  Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
                  Implementation Group: IG-1
                  Security Function: Protect
                • >

                Pass

                6.1.9 Ensure permissions on /etc/shells are configured

                Description:

                /etc/shells is a text file which contains the full pathnames of valid login shells. This file is consulted by chsh and available to be queried by other programs.

                It is critical to ensure that the /etc/shells file is protected from unauthorized access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.

                Run the following commands to remove excess permissions, set owner, and set group on /etc/shells :

                # chmod u-x,go-wx /etc/shells

                # chown root:root /etc/shells

                Show Assessment Evidence
                Complex Check
                AND
                Criterion: Ensure at least one file named /etc/shells exists and is owned by 0:0 and does not have permissions --x-wx-wx
                Existence Check: At Least One Exists
                Item Check: All
                Result: Pass
                File Item
                Name Type Status Value
                Filepath String Exists /etc/shells
                Path String Exists /etc
                Filename String Exists shells
                Type String Exists regular
                Group Id Int Exists 0
                User Id Int Exists 0
                A Time Int Exists 1706723084
                C Time Int Exists 1713148752
                M Time Int Exists 1706723084
                Size Int Exists 130
                Suid Int Exists false
                Sgid Boolean Exists false
                Sticky Boolean Exists false
                Uread Boolean Exists true
                Uwrite Boolean Exists true
                Uexec Boolean Exists false
                Gread Boolean Exists true
                Gwrite Boolean Exists false
                Gexec Boolean Exists false
                Oread Boolean Exists true
                Owrite Boolean Exists false
                Oexec Boolean Exists false
                Has Extended Acl Boolean Not collected No Value


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_6.1.9_Ensure_permissions_on_etcshells_are_configured"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.898-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>pass</xccdf:result>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3, MP-2</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995067"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995067">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995067"
                                       check="all"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure at least one file named /etc/shells exists and is owned by 0:0 and does not have permissions --x-wx-wx</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="pass">Pass</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <caption>File Item</caption>
                                        <thead>
                                           <tr>
                                              <th scope="col">Name</th>
                                              <th scope="col">Type</th>
                                              <th scope="col">Status</th>
                                              <th scope="col">Value</th>
                                           </tr>
                                        </thead>
                                        <tbody class="tbe">
                                           <tr>
                                              <td>Filepath</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>/etc/shells</td>
                                           </tr>
                                           <tr>
                                              <td>Path</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>/etc</td>
                                           </tr>
                                           <tr>
                                              <td>Filename</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>shells</td>
                                           </tr>
                                           <tr>
                                              <td>Type</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>regular</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Group Id</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>0</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>User Id</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>0</td>
                                           </tr>
                                           <tr>
                                              <td>A Time</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>1706723084</td>
                                           </tr>
                                           <tr>
                                              <td>C Time</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>1713148752</td>
                                           </tr>
                                           <tr>
                                              <td>M Time</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>1706723084</td>
                                           </tr>
                                           <tr>
                                              <td>Size</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>130</td>
                                           </tr>
                                           <tr>
                                              <td>Suid</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Sgid</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Sticky</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Uread</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>true</td>
                                           </tr>
                                           <tr>
                                              <td>Uwrite</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>true</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Uexec</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Gread</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>true</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Gwrite</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Gexec</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Oread</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>true</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Owrite</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Oexec</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Has Extended Acl</td>
                                              <td>Boolean</td>
                                              <td>Not collected</td>
                                              <td>No Value</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: AC-3, MP-2

                CIS Controls V7.0:

                • Control 14: Controlled Access Based on the Need to Know: -- More
                  CIS Control Information
                  Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
                  Subcontrol: 14.6
                  Label: Protect Information through Access Control Lists
                  Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
                • >

                CIS Critical Security Controls V8.0:

                • Control 3: Data Protection: -- More
                  CIS Control Information
                  Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
                  Safeguard: 3.3
                  Label: Configure Data Access Control Lists
                  Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
                  Implementation Group: IG-1
                  Security Function: Protect
                • >

                Fail

                6.1.10 Ensure permissions on /etc/opasswd are configured

                Description:

                /etc/security/opasswd and it's backup /etc/security/opasswd.old hold user's previous passwords if pam_unix or pam_pwhistory is in use on the system

                It is critical to ensure that /etc/security/opasswd is protected from unauthorized access. Although it is protected by default, the file permissions could be changed either inadvertently or through malicious actions.

                Run the following commands to remove excess permissions, set owner, and set group on /etc/security/opasswd and /etc/security/opasswd.old is they exist:

                # [ -e "/etc/security/opasswd" ] && chmod u-x,go-rwx /etc/security/opasswd

                # [ -e "/etc/security/opasswd" ] && chown root:root /etc/security/opasswd

                # [ -e "/etc/security/opasswd.old" ] && chmod u-x,go-rwx /etc/security/opasswd.old

                # [ -e "/etc/security/opasswd.old" ] && chown root:root /etc/security/opasswd.old

                Show Assessment Evidence
                Complex Check
                AND
                Criterion: Ensure at least one file named /etc/security/opasswd exists and is owned by 0:0 and does not have permissions --xrwxrwx
                Existence Check: At Least One Exists
                Item Check: All
                Result: Pass
                File Item
                Name Type Status Value
                Filepath String Exists /etc/security/opasswd
                Path String Exists /etc/security
                Filename String Exists opasswd
                Type String Exists regular
                Group Id Int Exists 0
                User Id Int Exists 0
                A Time Int Exists 1702260263
                C Time Int Exists 1706787254
                M Time Int Exists 1702260263
                Size Int Exists 0
                Suid Int Exists false
                Sgid Boolean Exists false
                Sticky Boolean Exists false
                Uread Boolean Exists true
                Uwrite Boolean Exists true
                Uexec Boolean Exists false
                Gread Boolean Exists false
                Gwrite Boolean Exists false
                Gexec Boolean Exists false
                Oread Boolean Exists false
                Owrite Boolean Exists false
                Oexec Boolean Exists false
                Has Extended Acl Boolean Not collected No Value
                Criterion: Ensure at least one file named /etc/security/opasswd.old exists and is owned by 0:0 and does not have permissions --xrwxrwx
                Existence Check: At Least One Exists
                Item Check: All
                Result: Fail
                No matching system items were found.


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_6.1.10_Ensure_permissions_on_etcopasswd_are_configured"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.898-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>fail</xccdf:result>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3, MP-2</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995075"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995075">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995075"
                                       check="all"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure at least one file named /etc/security/opasswd exists and is owned by 0:0 and does not have permissions --xrwxrwx</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="pass">Pass</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <caption>File Item</caption>
                                        <thead>
                                           <tr>
                                              <th scope="col">Name</th>
                                              <th scope="col">Type</th>
                                              <th scope="col">Status</th>
                                              <th scope="col">Value</th>
                                           </tr>
                                        </thead>
                                        <tbody class="tbe">
                                           <tr>
                                              <td>Filepath</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>/etc/security/opasswd</td>
                                           </tr>
                                           <tr>
                                              <td>Path</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>/etc/security</td>
                                           </tr>
                                           <tr>
                                              <td>Filename</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>opasswd</td>
                                           </tr>
                                           <tr>
                                              <td>Type</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>regular</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Group Id</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>0</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>User Id</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>0</td>
                                           </tr>
                                           <tr>
                                              <td>A Time</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>1702260263</td>
                                           </tr>
                                           <tr>
                                              <td>C Time</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>1706787254</td>
                                           </tr>
                                           <tr>
                                              <td>M Time</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>1702260263</td>
                                           </tr>
                                           <tr>
                                              <td>Size</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>0</td>
                                           </tr>
                                           <tr>
                                              <td>Suid</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Sgid</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Sticky</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Uread</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>true</td>
                                           </tr>
                                           <tr>
                                              <td>Uwrite</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>true</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Uexec</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Gread</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Gwrite</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Gexec</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Oread</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Owrite</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Oexec</td>
                                              <td>Boolean</td>
                                              <td>Exists</td>
                                              <td>false</td>
                                           </tr>
                                           <tr>
                                              <td>Has Extended Acl</td>
                                              <td>Boolean</td>
                                              <td>Not collected</td>
                                              <td>No Value</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995085"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995085">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995085"
                                       check="all"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure at least one file named /etc/security/opasswd.old exists and is owned by 0:0 and does not have permissions --xrwxrwx</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="fail">Fail</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <tr>
                                           <td>No matching system items were found.</td>
                                        </tr>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: AC-3, MP-2

                CIS Controls V7.0:

                • Control 14: Controlled Access Based on the Need to Know: -- More
                  CIS Control Information
                  Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
                  Subcontrol: 14.6
                  Label: Protect Information through Access Control Lists
                  Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
                • >

                CIS Critical Security Controls V8.0:

                • Control 3: Data Protection: -- More
                  CIS Control Information
                  Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
                  Safeguard: 3.3
                  Label: Configure Data Access Control Lists
                  Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
                  Implementation Group: IG-1
                  Security Function: Protect
                • >

                Fail

                6.1.11 Ensure world writable files and directories are secured

                Description:

                World writable files are the least secure. Data in world-writable files can be modified and compromised by any user on the system. World writable files may also indicate an incorrectly written script or program that could potentially be the cause of a larger compromise to the system's integrity. See the chmod(2) man page for more information.

                Setting the sticky bit on world writable directories prevents users from deleting or renaming files in that directory that are not owned by them.

                Data in world-writable files can be modified and compromised by any user on the system. World writable files may also indicate an incorrectly written script or program that could potentially be the cause of a larger compromise to the system's integrity.

                This feature prevents the ability to delete or rename files in world writable directories (such as /tmp ) that are owned by another user.

                • World Writable Files:
                  • It is recommended that write access is removed from other with the command ( chmod o-w <filename> ), but always consult relevant vendor documentation to avoid breaking any application dependencies on a given file.
                • World Writable Directories:
                  • Set the sticky bit on all world writable directories with the command ( chmod a+t <directory_name> )

                Run the following script to:

                • Remove other write permission from any world writable files
                • Add the sticky bit to all world writable directories
                #!/usr/bin/env bash



                {

                l_smask='01000'

                a_path=(); a_arr=() # Initialize array

                a_path=(! -path "/run/user/*" -a ! -path "/proc/*" -a ! -path "*/containerd/*" -a ! -path "*/kubelet/pods/*" -a ! -path "/sys/kernel/security/apparmor/*" -a ! -path "/snap/*" -a ! -path "/sys/fs/cgroup/memory/*")

                while read -r l_bfs; do

                a_path+=( -a ! -path ""$l_bfs"/*")

                done < <(findmnt -Dkerno fstype,target | awk '$1 ~ /^\s*(nfs|proc|smb)/ {print $2}')

                # Populate array with files

                while IFS= read -r -d $'\0' l_file; do

                [ -e "$l_file" ] && a_arr+=("$(stat -Lc '%n^%#a' "$l_file")")

                done < <(find / \( "${a_path[@]}" \) \( -type f -o -type d \) -perm -0002 -print0 2>/dev/null)

                while IFS="^" read -r l_fname l_mode; do # Test files in the array

                if [ -f "$l_fname" ]; then # Remove excess permissions from WW files

                echo -e " - File: \"$l_fname\" is mode: \"$l_mode\"\n - removing write permission on \"$l_fname\" from \"other\""

                chmod o-w "$l_fname"

                fi

                if [ -d "$l_fname" ]; then

                if [ ! $(( $l_mode & $l_smask )) -gt 0 ]; then # Add sticky bit

                echo -e " - Directory: \"$l_fname\" is mode: \"$l_mode\" and doesn't have the sticky bit set\n - Adding the sticky bit"

                chmod a+t "$l_fname"

                fi

                fi

                done < <(printf '%s\n' "${a_arr[@]}")

                unset a_path; unset a_arr # Remove array

                }

                Show Assessment Evidence
                Complex Check
                AND
                Script: sce/nix_world_writable_chk.sh
                Result: Fail
                Exit Value: 102
                Output:
                • - Audit Result:
                • ** FAIL **
                • - * Reasons for audit failure * :
                • - There are "2" World writable files on the system.
                • - The following is a list of World writable files:
                • /root/sample-asset.yaml
                • /tmp/startup-script.sh
                • - end of list
                • - * Correctly configured * :
                • - Sticky bit is set on world writable directories on the local filesystem.
                No error lines were collected.


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_6.1.11_Ensure_world_writable_files_and_directories_are_secured"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.898-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>fail</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3. MP-2</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://open-scap.org/page/SCE"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="sce/nix_world_writable_chk.sh"/>
                         <xccdf:check-content>
                            <command_result href="sce/nix_world_writable_chk.sh"
                                            xccdf="fail"
                                            script="/root/Assessor/sce/nix_world_writable_chk.sh"
                                            exit-value="102">
                               <out>
                                  <l/>
                                  <l>- Audit Result:</l>
                                  <l>  ** FAIL **</l>
                                  <l> - * Reasons for audit failure * :</l>
                                  <l/>
                                  <l> - There are "2" World writable files on the system.</l>
                                  <l>   - The following is a list of World writable files:</l>
                                  <l>/root/sample-asset.yaml</l>
                                  <l>/tmp/startup-script.sh</l>
                                  <l>   - end of list</l>
                                  <l/>
                                  <l>- * Correctly configured * :</l>
                                  <l/>
                                  <l>  - Sticky bit is set on world writable directories on the local filesystem.</l>
                                  <l/>
                               </out>
                               <err/>
                               <env/>
                            </command_result>
                         </xccdf:check-content>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="sce">
                               <table class="evidence-sep" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td class="bold">Script:</td>
                                        <td>sce/nix_world_writable_chk.sh</td>
                                     </tr>
                                     <tr>
                                        <td class="bold">Result:</td>
                                        <td class="fail">Fail</td>
                                     </tr>
                                     <tr>
                                        <td class="bold">Exit Value:</td>
                                        <td>102</td>
                                     </tr>
                                  </tbody>
                               </table>
                               <table class="evidence" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td class="bold">Output:</td>
                                        <td>
                                           <ul class="unstyled">
                                              <li/>
                                              <li>- Audit Result:</li>
                                              <li>  ** FAIL **</li>
                                              <li> - * Reasons for audit failure * :</li>
                                              <li/>
                                              <li> - There are "2" World writable files on the system.</li>
                                              <li>   - The following is a list of World writable files:</li>
                                              <li>/root/sample-asset.yaml</li>
                                              <li>/tmp/startup-script.sh</li>
                                              <li>   - end of list</li>
                                              <li/>
                                              <li>- * Correctly configured * :</li>
                                              <li/>
                                              <li>  - Sticky bit is set on world writable directories on the local filesystem.</li>
                                              <li/>
                                           </ul>
                                        </td>
                                     </tr>
                                  </tbody>
                               </table>
                               <table class="evidence" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td>No error lines were collected.</td>
                                     </tr>
                                  </tbody>
                               </table>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: AC-3. MP-2

                CIS Controls V7.0:

                • Control 14: Controlled Access Based on the Need to Know: -- More
                  CIS Control Information
                  Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
                  Subcontrol: 14.6
                  Label: Protect Information through Access Control Lists
                  Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
                • >

                CIS Critical Security Controls V8.0:

                • Control 3: Data Protection: -- More
                  CIS Control Information
                  Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
                  Safeguard: 3.3
                  Label: Configure Data Access Control Lists
                  Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
                  Implementation Group: IG-1
                  Security Function: Protect
                • >

                Fail

                6.1.12 Ensure no unowned or ungrouped files or directories exist

                Description:

                Administrators may delete users or groups from the system and neglect to remove all files and/or directories owned by those users or groups.

                A new user or group who is assigned a deleted user's user ID or group ID may then end up "owning" a deleted user or group's files, and thus have more access on the system than was intended.

                Remove or set ownership and group ownership of these files and/or directories to an active user on the system as appropriate.

                Show Assessment Evidence
                Complex Check
                AND
                Script: sce/nix_unowned_chk.sh
                Result: Fail
                Exit Value: 102
                Output:
                • Adding: /usr/local/bin/starship
                • - Audit Result:
                • ** FAIL **
                • - * Reasons for audit failure * :
                • - There are "1" ungrouped files or directories on the system.
                • - The following is a list of ungrouped files and/or directories:
                • /usr/local/bin/starship
                • - end of list
                • - * Correctly configured * :
                • - No unowned files or directories exist on the local filesystem.
                No error lines were collected.


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_6.1.12_Ensure_no_unowned_or_ungrouped_files_or_directories_exist"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.899-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>fail</xccdf:result>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: AC-3. MP-2</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://open-scap.org/page/SCE"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="sce/nix_unowned_chk.sh"/>
                         <xccdf:check-content>
                            <command_result href="sce/nix_unowned_chk.sh"
                                            xccdf="fail"
                                            script="/root/Assessor/sce/nix_unowned_chk.sh"
                                            exit-value="102">
                               <out>
                                  <l>Adding: /usr/local/bin/starship</l>
                                  <l/>
                                  <l>- Audit Result:</l>
                                  <l>  ** FAIL **</l>
                                  <l> - * Reasons for audit failure * :</l>
                                  <l/>
                                  <l>  - There are "1" ungrouped files or directories on the system.</l>
                                  <l>   - The following is a list of ungrouped files and/or directories:</l>
                                  <l>/usr/local/bin/starship</l>
                                  <l>   - end of list</l>
                                  <l>- * Correctly configured * :</l>
                                  <l/>
                                  <l>  - No unowned files or directories exist on the local filesystem.</l>
                                  <l/>
                               </out>
                               <err/>
                               <env/>
                            </command_result>
                         </xccdf:check-content>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="sce">
                               <table class="evidence-sep" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td class="bold">Script:</td>
                                        <td>sce/nix_unowned_chk.sh</td>
                                     </tr>
                                     <tr>
                                        <td class="bold">Result:</td>
                                        <td class="fail">Fail</td>
                                     </tr>
                                     <tr>
                                        <td class="bold">Exit Value:</td>
                                        <td>102</td>
                                     </tr>
                                  </tbody>
                               </table>
                               <table class="evidence" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td class="bold">Output:</td>
                                        <td>
                                           <ul class="unstyled">
                                              <li>Adding: /usr/local/bin/starship</li>
                                              <li/>
                                              <li>- Audit Result:</li>
                                              <li>  ** FAIL **</li>
                                              <li> - * Reasons for audit failure * :</li>
                                              <li/>
                                              <li>  - There are "1" ungrouped files or directories on the system.</li>
                                              <li>   - The following is a list of ungrouped files and/or directories:</li>
                                              <li>/usr/local/bin/starship</li>
                                              <li>   - end of list</li>
                                              <li>- * Correctly configured * :</li>
                                              <li/>
                                              <li>  - No unowned files or directories exist on the local filesystem.</li>
                                              <li/>
                                           </ul>
                                        </td>
                                     </tr>
                                  </tbody>
                               </table>
                               <table class="evidence" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td>No error lines were collected.</td>
                                     </tr>
                                  </tbody>
                               </table>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: AC-3. MP-2

                CIS Controls V7.0:

                • Control 14: Controlled Access Based on the Need to Know: -- More
                  CIS Control Information
                  Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
                  Subcontrol: 14.6
                  Label: Protect Information through Access Control Lists
                  Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
                • >

                CIS Critical Security Controls V8.0:

                • Control 3: Data Protection: -- More
                  CIS Control Information
                  Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
                  Safeguard: 3.3
                  Label: Configure Data Access Control Lists
                  Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
                  Implementation Group: IG-1
                  Security Function: Protect
                • >

                Manual

                6.1.13 Ensure SUID and SGID files are reviewed

                Description:

                The owner of a file can set the file's permissions to run with the owner's or group's permissions, even if the user running the program is not the owner or a member of the group. The most common reason for a SUID or SGID program is to enable users to perform functions (such as changing their password) that require root privileges.

                There are valid reasons for SUID and SGID programs, but it is important to identify and review such programs to ensure they are legitimate. Review the files returned by the action in the audit section and check to see if system binaries have a different checksum than what from the package. This is an indication that the binary may have been replaced.

                Ensure that no rogue SUID or SGID programs have been introduced into the system. Review the files returned by the action in the Audit section and confirm the integrity of these binaries.



                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_6.1.13_Ensure_SUID_and_SGID_files_are_reviewed"
                                   role="unscored"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.899-04:00"
                                   version="1"
                                   weight="0.0">
                   <xccdf:result>notchecked</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5, AC-3, MP-2</xccdf:ident>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5, AC-3, MP-2

                CIS Controls V7.0:

                • Control 14: Controlled Access Based on the Need to Know: -- More
                  CIS Control Information
                  Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
                  Subcontrol: 14.6
                  Label: Protect Information through Access Control Lists
                  Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
                • >

                CIS Critical Security Controls V8.0:

                • Control 3: Data Protection: -- More
                  CIS Control Information
                  Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
                  Safeguard: 3.3
                  Label: Configure Data Access Control Lists
                  Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
                  Implementation Group: IG-1
                  Security Function: Protect
                • >

                6.2 Local User and Group Settings

                This section provides guidance on securing aspects of the local users and groups.

                Note: The recommendations in this section check local users and groups. Any users or groups from other sources such as LDAP will not be audited. In a domain environment similar checks should be performed against domain users and groups.

                Pass

                6.2.1 Ensure accounts in /etc/passwd use shadowed passwords

                Description:

                Local accounts can uses shadowed passwords. With shadowed passwords, The passwords are saved in shadow password file, /etc/shadow , encrypted by a salted one-way hash. Accounts with a shadowed password have an x in the second field in /etc/passwd .

                The /etc/passwd file also contains information like user ID's and group ID's that are used by many system programs. Therefore, the /etc/passwd file must remain world readable. In spite of encoding the password with a randomly-generated one-way hash function, an attacker could still break the system if they got access to the /etc/passwd file. This can be mitigated by using shadowed passwords, thus moving the passwords in the /etc/passwd file to /etc/shadow . The /etc/shadow file is set so only root will be able to read and write. This helps mitigate the risk of an attacker gaining access to the encoded passwords with which to perform a dictionary attack.

                Note:

                • All accounts must have passwords or be locked to prevent the account from being used by an unauthorized user.
                • A user account with an empty second field in /etc/passwd allows the account to be logged into by providing only the username.

                Run the following command to set accounts to use shadowed passwords:

                # sed -e 's/^\([a-zA-Z0-9_]*\):[^:]*:/\1:x:/' -i /etc/passwd

                Investigate to determine if the account is logged in and what it is being used for, to determine if it needs to be forced off.

                Show Assessment Evidence
                Complex Check
                AND
                Criterion: Ensure no file named /etc/passwd exists and matches pattern ^\s*[^:]+:[^x:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*(\s+#.*)?$
                Existence Check: None Exist
                Item Check: All
                Result: Pass
                No matching system items were found.


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_6.2.1_Ensure_accounts_in_etcpasswd_use_shadowed_passwords"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.899-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>pass</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/16/subcontrol/4"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/11"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: IA-5</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995108"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995108">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995108"
                                       check="all"
                                       check_existence="none_exist">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure no file named /etc/passwd exists and matches pattern ^\s*[^:]+:[^x:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*(\s+#.*)?$</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>None Exist</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="pass">Pass</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <tr>
                                           <td>No matching system items were found.</td>
                                        </tr>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: IA-5

                CIS Controls V7.0:

                • Control 16: Account Monitoring and Control: -- More
                  CIS Control Information
                  Control: Actively manage the life cycle of system and application accounts - their creation, use, dormancy, deletion - in order to minimize opportunities for attackers to leverage them.
                  Subcontrol: 16.4
                  Label: Encrypt or Hash all Authentication Credentials
                  Description: Encrypt or hash with a salt all authentication credentials when stored.
                • >

                CIS Critical Security Controls V8.0:

                • Control 3: Data Protection: -- More
                  CIS Control Information
                  Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
                  Safeguard: 3.11
                  Label: Encrypt Sensitive Data at Rest
                  Description: Encrypt sensitive data at rest on servers, applications, and databases containing sensitive data. Storage-layer encryption, also known as server-side encryption, meets the minimum requirement of this Safeguard. Additional encryption methods may include application-layer encryption, also known as client-side encryption, where access to the data storage device(s) does not permit access to the plain-text data.
                  Implementation Group: IG-2
                  Security Function: Protect
                • >

                Pass

                6.2.2 Ensure /etc/shadow password fields are not empty

                Description:

                An account with an empty password field means that anybody may log in as that user without providing a password.

                All accounts must have passwords or be locked to prevent the account from being used by an unauthorized user.

                If any accounts in the /etc/shadow file do not have a password, run the following command to lock the account until it can be determined why it does not have a password:

                # passwd -l <username>

                Also, check to see if the account is logged in and investigate what it is being used for to determine if it needs to be forced off.

                Show Assessment Evidence
                Complex Check
                AND
                Criterion: Ensure usernames pattern match .+ have shadow parameter password Pattern Match .+ (string)
                Existence Check: At Least One Exists
                Item Check: All
                Result: Pass
                Shadow Item
                Name Type Status Value
                Username String Exists admin
                Password String Exists $6$[OBFUSCATED HASHED PWD]
                Chg Lst Int Exists 19753
                Chg Allow Int Exists 0
                Chg Req Int Exists 99999
                Exp Warn Int Exists 7
                Exp Inact Int Does not exist No Value
                Exp Date Int Does not exist No Value
                Flag String Exists No Value
                Encrypt Method String Exists SHA-512
                Shadow Item
                Name Type Status Value
                Username String Exists root
                Password String Exists $6$[OBFUSCATED HASHED PWD]
                Chg Lst Int Exists 19753
                Chg Allow Int Exists 0
                Chg Req Int Exists 99999
                Exp Warn Int Exists 7
                Exp Inact Int Does not exist No Value
                Exp Date Int Does not exist No Value
                Flag String Exists No Value
                Encrypt Method String Exists SHA-512


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_6.2.2_Ensure_etcshadow_password_fields_are_not_empty"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.899-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>pass</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/4/subcontrol/4"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/5/subcontrol/2"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: IA-5</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-export export-name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3995115"
                                             value-id="xccdf_org.cisecurity.benchmarks_value_3995115_var"/>
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995115"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995115">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995115"
                                       check="all"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure usernames pattern match .+ have shadow parameter password Pattern Match .+ (string)</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="pass">Pass</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <caption>Shadow Item</caption>
                                        <thead>
                                           <tr>
                                              <th scope="col">Name</th>
                                              <th scope="col">Type</th>
                                              <th scope="col">Status</th>
                                              <th scope="col">Value</th>
                                           </tr>
                                        </thead>
                                        <tbody class="tbe">
                                           <tr>
                                              <td>Username</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>admin</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Password</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>$6$[OBFUSCATED HASHED PWD]</td>
                                           </tr>
                                           <tr>
                                              <td>Chg Lst</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>19753</td>
                                           </tr>
                                           <tr>
                                              <td>Chg Allow</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>0</td>
                                           </tr>
                                           <tr>
                                              <td>Chg Req</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>99999</td>
                                           </tr>
                                           <tr>
                                              <td>Exp Warn</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>7</td>
                                           </tr>
                                           <tr>
                                              <td>Exp Inact</td>
                                              <td>Int</td>
                                              <td>Does not exist</td>
                                              <td>No Value</td>
                                           </tr>
                                           <tr>
                                              <td>Exp Date</td>
                                              <td>Int</td>
                                              <td>Does not exist</td>
                                              <td>No Value</td>
                                           </tr>
                                           <tr>
                                              <td>Flag</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>No Value</td>
                                           </tr>
                                           <tr>
                                              <td>Encrypt Method</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>SHA-512</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <caption>Shadow Item</caption>
                                        <thead>
                                           <tr>
                                              <th scope="col">Name</th>
                                              <th scope="col">Type</th>
                                              <th scope="col">Status</th>
                                              <th scope="col">Value</th>
                                           </tr>
                                        </thead>
                                        <tbody class="tbe">
                                           <tr>
                                              <td>Username</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>root</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Password</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>$6$[OBFUSCATED HASHED PWD]</td>
                                           </tr>
                                           <tr>
                                              <td>Chg Lst</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>19753</td>
                                           </tr>
                                           <tr>
                                              <td>Chg Allow</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>0</td>
                                           </tr>
                                           <tr>
                                              <td>Chg Req</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>99999</td>
                                           </tr>
                                           <tr>
                                              <td>Exp Warn</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>7</td>
                                           </tr>
                                           <tr>
                                              <td>Exp Inact</td>
                                              <td>Int</td>
                                              <td>Does not exist</td>
                                              <td>No Value</td>
                                           </tr>
                                           <tr>
                                              <td>Exp Date</td>
                                              <td>Int</td>
                                              <td>Does not exist</td>
                                              <td>No Value</td>
                                           </tr>
                                           <tr>
                                              <td>Flag</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>No Value</td>
                                           </tr>
                                           <tr>
                                              <td>Encrypt Method</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>SHA-512</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: IA-5

                CIS Controls V7.0:

                • Control 4: Controlled Use of Administrative Privileges: -- More
                  CIS Control Information
                  Control: The processes and tools used to track/control/prevent/correct the use, assignment, and configuration of administrative privileges on computers, networks, and applications.
                  Subcontrol: 4.4
                  Label: Use Unique Passwords
                  Description: Where multi-factor authentication is not supported (such as local administrator, root, or service accounts), accounts will use passwords that are unique to that system.
                • >

                CIS Critical Security Controls V8.0:

                • Control 5: Account Management: -- More
                  CIS Control Information
                  Control: Use processes and tools to assign and manage authorization to credentials for user accounts, including administrator accounts, as well as service accounts, to enterprise assets and software.
                  Safeguard: 5.2
                  Label: Use Unique Passwords
                  Description: Use unique passwords for all enterprise assets. Best practice implementation includes, at a minimum, an 8-character password for accounts using MFA and a 14-character password for accounts not using MFA.
                  Implementation Group: IG-1
                  Security Function: Protect
                • >

                Pass

                6.2.3 Ensure all groups in /etc/passwd exist in /etc/group

                Description:

                Over time, system administration errors and changes can lead to groups being defined in /etc/passwd but not in /etc/group .

                Groups defined in the /etc/passwd file but not in the /etc/group file pose a threat to system security since group permissions are not properly managed.

                Analyze the output of the Audit step above and perform the appropriate action to correct any discrepancies found.

                Show Assessment Evidence
                Complex Check
                AND
                Script: sce/etc_group_chk.sh
                Result: Pass
                Exit Value: 101
                Output:
                • All groups in /etc/passwd exist in /etc/group
                No error lines were collected.


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_6.2.3_Ensure_all_groups_in_etcpasswd_exist_in_etcgroup"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.899-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>pass</xccdf:result>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://open-scap.org/page/SCE"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="sce/etc_group_chk.sh"/>
                         <xccdf:check-content>
                            <command_result href="sce/etc_group_chk.sh"
                                            xccdf="pass"
                                            script="/root/Assessor/sce/etc_group_chk.sh"
                                            exit-value="101">
                               <out>
                                  <l>All groups in /etc/passwd exist in /etc/group</l>
                               </out>
                               <err/>
                               <env/>
                            </command_result>
                         </xccdf:check-content>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="sce">
                               <table class="evidence-sep" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td class="bold">Script:</td>
                                        <td>sce/etc_group_chk.sh</td>
                                     </tr>
                                     <tr>
                                        <td class="bold">Result:</td>
                                        <td class="pass">Pass</td>
                                     </tr>
                                     <tr>
                                        <td class="bold">Exit Value:</td>
                                        <td>101</td>
                                     </tr>
                                  </tbody>
                               </table>
                               <table class="evidence" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td class="bold">Output:</td>
                                        <td>
                                           <ul class="unstyled">
                                              <li>All groups in /etc/passwd exist in /etc/group</li>
                                           </ul>
                                        </td>
                                     </tr>
                                  </tbody>
                               </table>
                               <table class="evidence" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td>No error lines were collected.</td>
                                     </tr>
                                  </tbody>
                               </table>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5

                Pass

                6.2.4 Ensure shadow group is empty

                Description:

                The shadow group allows system programs which require access the ability to read the /etc/shadow file. No users should be assigned to the shadow group.

                Any users assigned to the shadow group would be granted read access to the /etc/shadow file. If attackers can gain read access to the /etc/shadow file, they can easily run a password cracking program against the hashed passwords to break them. Other security information that is stored in the /etc/shadow file (such as expiration) could also be useful to subvert additional user accounts.

                Run the following command to remove all users from the shadow group

                # sed -ri 's/(^shadow:[^:]*:[^:]*:)([^:]+$)/\1/' /etc/group

                Change the primary group of any users with shadow as their primary group.

                # usermod -g <primary group> <user>

                Show Assessment Evidence
                Complex Check
                AND
                Criterion: Ensure no file named /etc/group exists and matches pattern ^shadow:[^:]*:[^:]*:[^:]+$
                Existence Check: None Exist
                Item Check: All
                Result: Pass
                No matching system items were found.
                Script: sce/nix_user_shadow_primary_group_chk.sh
                Result: Pass
                Exit Value: 101
                Output:
                • PASSED: No users have group shadow as their primary group
                No error lines were collected.


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_6.2.4_Ensure_shadow_group_is_empty"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.899-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>pass</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: IA-5</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995126"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995126">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995126"
                                       check="all"
                                       check_existence="none_exist">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure no file named /etc/group exists and matches pattern ^shadow:[^:]*:[^:]*:[^:]+$</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>None Exist</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="pass">Pass</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <tr>
                                           <td>No matching system items were found.</td>
                                        </tr>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                      <xccdf:check system="http://open-scap.org/page/SCE"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="sce/nix_user_shadow_primary_group_chk.sh"/>
                         <xccdf:check-content>
                            <command_result href="sce/nix_user_shadow_primary_group_chk.sh"
                                            xccdf="pass"
                                            script="/root/Assessor/sce/nix_user_shadow_primary_group_chk.sh"
                                            exit-value="101">
                               <out>
                                  <l>PASSED: No users have group shadow as their primary group</l>
                               </out>
                               <err/>
                               <env/>
                            </command_result>
                         </xccdf:check-content>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="sce">
                               <table class="evidence-sep" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td class="bold">Script:</td>
                                        <td>sce/nix_user_shadow_primary_group_chk.sh</td>
                                     </tr>
                                     <tr>
                                        <td class="bold">Result:</td>
                                        <td class="pass">Pass</td>
                                     </tr>
                                     <tr>
                                        <td class="bold">Exit Value:</td>
                                        <td>101</td>
                                     </tr>
                                  </tbody>
                               </table>
                               <table class="evidence" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td class="bold">Output:</td>
                                        <td>
                                           <ul class="unstyled">
                                              <li>PASSED: No users have group shadow as their primary group</li>
                                           </ul>
                                        </td>
                                     </tr>
                                  </tbody>
                               </table>
                               <table class="evidence" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td>No error lines were collected.</td>
                                     </tr>
                                  </tbody>
                               </table>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: IA-5

                CIS Controls V7.0:

                • Control 14: Controlled Access Based on the Need to Know: -- More
                  CIS Control Information
                  Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
                  Subcontrol: 14.6
                  Label: Protect Information through Access Control Lists
                  Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
                • >

                CIS Critical Security Controls V8.0:

                • Control 3: Data Protection: -- More
                  CIS Control Information
                  Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
                  Safeguard: 3.3
                  Label: Configure Data Access Control Lists
                  Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
                  Implementation Group: IG-1
                  Security Function: Protect
                • >

                Pass

                6.2.5 Ensure no duplicate UIDs exist

                Description:

                Although the useradd program will not let you create a duplicate User ID (UID), it is possible for an administrator to manually edit the /etc/passwd file and change the UID field.

                Users must be assigned unique UIDs for accountability and to ensure appropriate access protections.

                Based on the results of the audit script, establish unique UIDs and review all files owned by the shared UIDs to determine which UID they are supposed to belong to.

                Show Assessment Evidence
                Complex Check
                AND
                Criterion: Linux Custom Object "Check For Duplicate UIDs"
                Existence Check: At Least One Exists
                Item Check: All
                Result: Pass
                Variable Item
                Name Type Status Value
                Var Ref String Exists oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3995136
                Value Int Exists 27


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_6.2.5_Ensure_no_duplicate_UIDs_exist"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.899-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>pass</xccdf:result>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995136"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995136">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995136"
                                       check="all"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Linux Custom Object "Check For Duplicate UIDs"</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="pass">Pass</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <caption>Variable Item</caption>
                                        <thead>
                                           <tr>
                                              <th scope="col">Name</th>
                                              <th scope="col">Type</th>
                                              <th scope="col">Status</th>
                                              <th scope="col">Value</th>
                                           </tr>
                                        </thead>
                                        <tbody class="tbe">
                                           <tr>
                                              <td>Var Ref</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3995136</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Value</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>27</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5

                Pass

                6.2.6 Ensure no duplicate GIDs exist

                Description:

                Although the groupadd program will not let you create a duplicate Group ID (GID), it is possible for an administrator to manually edit the /etc/group file and change the GID field.

                User groups must be assigned unique GIDs for accountability and to ensure appropriate access protections.

                Based on the results of the audit script, establish unique GIDs and review all files owned by the shared GID to determine which group they are supposed to belong to.

                Show Assessment Evidence
                Complex Check
                AND
                Criterion: Linux Custom Object "Check For Duplicate GIDs"
                Existence Check: At Least One Exists
                Item Check: All
                Result: Pass
                Variable Item
                Name Type Status Value
                Var Ref String Exists oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3995141
                Value Int Exists 53


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_6.2.6_Ensure_no_duplicate_GIDs_exist"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.899-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>pass</xccdf:result>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995141"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995141">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995141"
                                       check="all"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Linux Custom Object "Check For Duplicate GIDs"</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="pass">Pass</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <caption>Variable Item</caption>
                                        <thead>
                                           <tr>
                                              <th scope="col">Name</th>
                                              <th scope="col">Type</th>
                                              <th scope="col">Status</th>
                                              <th scope="col">Value</th>
                                           </tr>
                                        </thead>
                                        <tbody class="tbe">
                                           <tr>
                                              <td>Var Ref</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3995141</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Value</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>53</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5

                Pass

                6.2.7 Ensure no duplicate user names exist

                Description:

                Although the useradd program will not let you create a duplicate user name, it is possible for an administrator to manually edit the /etc/passwd file and change the user name.

                If a user is assigned a duplicate user name, it will create and have access to files with the first UID for that username in /etc/passwd . For example, if "test4" has a UID of 1000 and a subsequent "test4" entry has a UID of 2000, logging in as "test4" will use UID 1000. Effectively, the UID is shared, which is a security problem.

                Based on the results of the audit script, establish unique user names for the users. File ownerships will automatically reflect the change as long as the users have unique UIDs.

                Show Assessment Evidence
                Complex Check
                AND
                Criterion: Linux Custom Object "Check For Duplicate User Names"
                Existence Check: At Least One Exists
                Item Check: All
                Result: Pass
                Variable Item
                Name Type Status Value
                Var Ref String Exists oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3995146
                Value Int Exists 27


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_6.2.7_Ensure_no_duplicate_user_names_exist"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.899-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>pass</xccdf:result>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995146"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995146">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995146"
                                       check="all"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Linux Custom Object "Check For Duplicate User Names"</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="pass">Pass</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <caption>Variable Item</caption>
                                        <thead>
                                           <tr>
                                              <th scope="col">Name</th>
                                              <th scope="col">Type</th>
                                              <th scope="col">Status</th>
                                              <th scope="col">Value</th>
                                           </tr>
                                        </thead>
                                        <tbody class="tbe">
                                           <tr>
                                              <td>Var Ref</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3995146</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Value</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>27</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5

                Pass

                6.2.8 Ensure no duplicate group names exist

                Description:

                Although the groupadd program will not let you create a duplicate group name, it is possible for an administrator to manually edit the /etc/group file and change the group name.

                If a group is assigned a duplicate group name, it will create and have access to files with the first GID for that group in /etc/group . Effectively, the GID is shared, which is a security problem.

                Based on the results of the audit script, establish unique names for the user groups. File group ownerships will automatically reflect the change as long as the groups have unique GIDs.

                Show Assessment Evidence
                Complex Check
                AND
                Criterion: Linux Custom Object "Check For Duplicate Group Names"
                Existence Check: At Least One Exists
                Item Check: All
                Result: Pass
                Variable Item
                Name Type Status Value
                Var Ref String Exists oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3995151
                Value Int Exists 53


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_6.2.8_Ensure_no_duplicate_group_names_exist"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.899-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>pass</xccdf:result>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995151"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995151">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995151"
                                       check="all"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Linux Custom Object "Check For Duplicate Group Names"</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="pass">Pass</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <caption>Variable Item</caption>
                                        <thead>
                                           <tr>
                                              <th scope="col">Name</th>
                                              <th scope="col">Type</th>
                                              <th scope="col">Status</th>
                                              <th scope="col">Value</th>
                                           </tr>
                                        </thead>
                                        <tbody class="tbe">
                                           <tr>
                                              <td>Var Ref</td>
                                              <td>String</td>
                                              <td>Exists</td>
                                              <td>oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:var:3995151</td>
                                           </tr>
                                           <tr class="evaluated">
                                              <td>Value</td>
                                              <td>Int</td>
                                              <td>Exists</td>
                                              <td>53</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5

                Pass

                6.2.9 Ensure root PATH Integrity

                Description:

                The root user can execute any command on the system and could be fooled into executing programs unintentionally if the PATH is not set correctly.

                Including the current working directory (.) or other writable directory in root 's executable path makes it likely that an attacker can gain superuser access by forcing an administrator operating as root to execute a Trojan horse program.

                Correct or justify any items discovered in the Audit step.

                Show Assessment Evidence
                Complex Check
                AND
                Script: sce/root_path.sh
                Result: Pass
                Exit Value: 101
                Output:
                • - Audit Result:
                • ** PASS **
                Errors:
                • /root/.bash_profile: line 36: lolcat: command not found


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_6.2.9_Ensure_root_PATH_Integrity"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.899-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>pass</xccdf:result>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://open-scap.org/page/SCE"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="sce/root_path.sh"/>
                         <xccdf:check-content>
                            <command_result href="sce/root_path.sh"
                                            xccdf="pass"
                                            script="/root/Assessor/sce/root_path.sh"
                                            exit-value="101">
                               <out>
                                  <l/>
                                  <l>- Audit Result:</l>
                                  <l>  ** PASS **</l>
                                  <l/>
                               </out>
                               <err>
                                  <l>/root/.bash_profile: line 36: lolcat: command not found</l>
                               </err>
                               <env/>
                            </command_result>
                         </xccdf:check-content>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="sce">
                               <table class="evidence-sep" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td class="bold">Script:</td>
                                        <td>sce/root_path.sh</td>
                                     </tr>
                                     <tr>
                                        <td class="bold">Result:</td>
                                        <td class="pass">Pass</td>
                                     </tr>
                                     <tr>
                                        <td class="bold">Exit Value:</td>
                                        <td>101</td>
                                     </tr>
                                  </tbody>
                               </table>
                               <table class="evidence" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td class="bold">Output:</td>
                                        <td>
                                           <ul class="unstyled">
                                              <li/>
                                              <li>- Audit Result:</li>
                                              <li>  ** PASS **</li>
                                              <li/>
                                           </ul>
                                        </td>
                                     </tr>
                                  </tbody>
                               </table>
                               <table class="evidence" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td class="bold">Errors:</td>
                                        <td>
                                           <ul>
                                              <li>/root/.bash_profile: line 36: lolcat: command not found</li>
                                           </ul>
                                        </td>
                                     </tr>
                                  </tbody>
                               </table>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5

                Pass

                6.2.10 Ensure root is the only UID 0 account

                Description:

                Any account with UID 0 has superuser privileges on the system.

                This access must be limited to only the default root account and only from the system console. Administrative access must be through an unprivileged account using an approved mechanism as noted in Item 5.6 Ensure access to the su command is restricted.

                Remove any users other than root with UID 0 or assign them a new UID if appropriate.

                Show Assessment Evidence
                Complex Check
                AND
                Criterion: Ensure at least one file named /etc/passwd exists and does not match pattern ^(?!root:)[^:]*:[^:]*:0
                Existence Check: At Least One Exists
                Item Check: All
                Result: Fail
                No matching system items were found.


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_6.2.10_Ensure_root_is_the_only_UID_0_account"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.899-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>pass</xccdf:result>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="#OVAL-Results-1"
                                                  name="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995163"/>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="definition"
                                 id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:def:3995163">
                               <div class="criteria">
                                  <div class="criterion"
                                       id="oval:org.cisecurity.benchmarks.canonical_ubuntu_linux_20:tst:3995163"
                                       check="all"
                                       check_existence="at_least_one_exists">
                                     <table class="evidence-sep" width="100%">
                                        <tbody class="tbe">
                                           <tr>
                                              <td class="bold">Criterion:</td>
                                              <td>Ensure at least one file named /etc/passwd exists and does not match pattern ^(?!root:)[^:]*:[^:]*:0</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Existence Check:</td>
                                              <td>At Least One Exists</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Item Check:</td>
                                              <td>All</td>
                                           </tr>
                                           <tr>
                                              <td class="bold">Result:</td>
                                              <td class="fail">Fail</td>
                                           </tr>
                                        </tbody>
                                     </table>
                                     <table class="evidence" width="100%">
                                        <tr>
                                           <td>No matching system items were found.</td>
                                        </tr>
                                     </table>
                                  </div>
                               </div>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5

                Fail

                6.2.11 Ensure local interactive user home directories are configured

                Description:

                The user home directory is space defined for the particular user to set local environment variables and to store personal files. While the system administrator can establish secure permissions for users' home directories, the users can easily override these. Users can be defined in /etc/passwd without a home directory or with a home directory that does not actually exist.

                Since the user is accountable for files stored in the user home directory, the user must be the owner of the directory. Group or world-writable user home directories may enable malicious users to steal or modify other users' data or to gain another user's system privileges. If the user's home directory does not exist or is unassigned, the user will be placed in "/" and will not be able to write any files or have local environment variables set.

                If a local interactive users' home directory is undefined and/or doesn't exist, follow local site policy and perform one of the following:

                • Lock the user account
                • Remove the user from the system
                • create a directory for the user. If undefined, edit /etc/passwd and add the absolute path to the directory to the last field of the user.

                Run the following script to:

                • Remove excessive permissions from local interactive users home directories
                • Update the home directory's owner
                #!/usr/bin/env bash



                {

                l_output2=""

                l_valid_shells="^($( awk -F\/ '$NF != "nologin" {print}' /etc/shells | sed -rn '/^\//{s,/,\\\\/,g;p}' | paste -s -d '|' - ))$"

                unset a_uarr && a_uarr=() # Clear and initialize array

                while read -r l_epu l_eph; do # Populate array with users and user home location

                a_uarr+=("$l_epu $l_eph")

                done <<< "$(awk -v pat="$l_valid_shells" -F: '$(NF) ~ pat { print $1 " " $(NF-1) }' /etc/passwd)"

                l_asize="${#a_uarr[@]}" # Here if we want to look at number of users before proceeding

                [ "$l_asize " -gt "10000" ] && echo -e "\n ** INFO **\n - \"$l_asize\" Local interactive users found on the system\n - This may be a long running process\n"

                while read -r l_user l_home; do

                if [ -d "$l_home" ]; then

                l_mask='0027'

                l_max="$( printf '%o' $(( 0777 & ~$l_mask)) )"

                while read -r l_own l_mode; do

                if [ "$l_user" != "$l_own" ]; then

                l_output2="$l_output2\n - User: \"$l_user\" Home \"$l_home\" is owned by: \"$l_own\"\n - changing ownership to: \"$l_user\"\n"

                chown "$l_user" "$l_home"

                fi

                if [ $(( $l_mode & $l_mask )) -gt 0 ]; then

                l_output2="$l_output2\n - User: \"$l_user\" Home \"$l_home\" is mode: \"$l_mode\" should be mode: \"$l_max\" or more restrictive\n - removing excess permissions\n"

                chmod g-w,o-rwx "$l_home"

                fi

                done <<< "$(stat -Lc '%U %#a' "$l_home")"

                else

                l_output2="$l_output2\n - User: \"$l_user\" Home \"$l_home\" Doesn't exist\n - Please create a home in accordance with local site policy"

                fi

                done <<< "$(printf '%s\n' "${a_uarr[@]}")"

                if [ -z "$l_output2" ]; then # If l_output2 is empty, we pass

                echo -e " - No modification needed to local interactive users home directories"

                else

                echo -e "\n$l_output2"

                fi

                }

                Show Assessment Evidence
                Complex Check
                AND
                Script: sce/nix_user_home_directory_chk.sh
                Result: Fail
                Exit Value: 102
                Output:
                • - Audit Result:
                • ** FAIL **
                • - * Reasons for audit failure * :
                • - User: "john" Home "/home/john" Doesn't exist
                • - User: "admin" Home "/home/admin" is mode: "0755" should be mode: "750" or more restrictive
                • - * Correctly configured * :
                • - All local interactive users:
                • - own their home directory
                No error lines were collected.


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_6.2.11_Ensure_local_interactive_user_home_directories_are_configured"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.899-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>fail</xccdf:result>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://open-scap.org/page/SCE"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="sce/nix_user_home_directory_chk.sh"/>
                         <xccdf:check-content>
                            <command_result href="sce/nix_user_home_directory_chk.sh"
                                            xccdf="fail"
                                            script="/root/Assessor/sce/nix_user_home_directory_chk.sh"
                                            exit-value="102">
                               <out>
                                  <l/>
                                  <l>- Audit Result:</l>
                                  <l>  ** FAIL **</l>
                                  <l> - * Reasons for audit failure * :</l>
                                  <l/>
                                  <l>  - User: "john" Home "/home/john" Doesn't exist</l>
                                  <l>  - User: "admin" Home "/home/admin" is mode: "0755" should be mode: "750" or more restrictive</l>
                                  <l/>
                                  <l>- * Correctly configured * :</l>
                                  <l>  - All local interactive users:</l>
                                  <l>   - own their home directory</l>
                               </out>
                               <err/>
                               <env/>
                            </command_result>
                         </xccdf:check-content>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="sce">
                               <table class="evidence-sep" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td class="bold">Script:</td>
                                        <td>sce/nix_user_home_directory_chk.sh</td>
                                     </tr>
                                     <tr>
                                        <td class="bold">Result:</td>
                                        <td class="fail">Fail</td>
                                     </tr>
                                     <tr>
                                        <td class="bold">Exit Value:</td>
                                        <td>102</td>
                                     </tr>
                                  </tbody>
                               </table>
                               <table class="evidence" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td class="bold">Output:</td>
                                        <td>
                                           <ul class="unstyled">
                                              <li/>
                                              <li>- Audit Result:</li>
                                              <li>  ** FAIL **</li>
                                              <li> - * Reasons for audit failure * :</li>
                                              <li/>
                                              <li>  - User: "john" Home "/home/john" Doesn't exist</li>
                                              <li>  - User: "admin" Home "/home/admin" is mode: "0755" should be mode: "750" or more restrictive</li>
                                              <li/>
                                              <li>- * Correctly configured * :</li>
                                              <li>  - All local interactive users:</li>
                                              <li>   - own their home directory</li>
                                           </ul>
                                        </td>
                                     </tr>
                                  </tbody>
                               </table>
                               <table class="evidence" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td>No error lines were collected.</td>
                                     </tr>
                                  </tbody>
                               </table>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5

                CIS Controls V7.0:

                • Control 14: Controlled Access Based on the Need to Know: -- More
                  CIS Control Information
                  Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
                  Subcontrol: 14.6
                  Label: Protect Information through Access Control Lists
                  Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
                • >

                CIS Critical Security Controls V8.0:

                • Control 3: Data Protection: -- More
                  CIS Control Information
                  Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
                  Safeguard: 3.3
                  Label: Configure Data Access Control Lists
                  Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
                  Implementation Group: IG-1
                  Security Function: Protect
                • >

                Fail

                6.2.12 Ensure local interactive user dot files access is configured

                Description:

                While the system administrator can establish secure permissions for users' "dot" files, the users can easily override these.

                • .forward file specifies an email address to forward the user's mail to.
                • .rhost file provides the "remote authentication" database for the rcp, rlogin, and rsh commands and the rcmd() function. These files bypass the standard password-based user authentication mechanism. They specify remote hosts and users that are considered trusted (i.e. are allowed to access the local system without supplying a password)
                • .netrc file contains data for logging into a remote host or passing authentication to an API.
                • .bash_history file keeps track of the user’s last 500 commands.

                User configuration files with excessive or incorrect access may enable malicious users to steal or modify other users' data or to gain another user's system privileges.

                Making global modifications to users' files without alerting the user community can result in unexpected outages and unhappy users. Therefore, it is recommended that a monitoring policy be established to report user dot file permissions and determine the action to be taken in accordance with site policy.

                The following script will:

                • remove excessive permissions on dot files within interactive users' home directories
                • change ownership of dot files within interactive users' home directories to the user
                • change group ownership of dot files within interactive users' home directories to the user's primary group
                • list .forward and .rhost files to be investigated and manually deleted
                #!/usr/bin/env bash



                {

                l_valid_shells="^($( awk -F\/ '$NF != "nologin" {print}' /etc/shells | sed -rn '/^\//{s,/,\\\\/,g;p}' | paste -s -d '|' - ))$"

                unset a_uarr && a_uarr=() # Clear and initialize array

                while read -r l_epu l_eph; do # Populate array with users and user home location

                [[ -n "$l_epu" && -n "$l_eph" ]] && a_uarr+=("$l_epu $l_eph")

                done <<< "$(awk -v pat="$l_valid_shells" -F: '$(NF) ~ pat { print $1 " " $(NF-1) }' /etc/passwd)"

                l_asize="${#a_uarr[@]}" # Here if we want to look at number of users before proceeding

                l_maxsize="1000" # Maximum number of local interactive users before warning (Default 1,000)

                [ "$l_asize " -gt "$l_maxsize" ] && echo -e "\n ** INFO **\n - \"$l_asize\" Local interactive users found on the system\n - This may be a long running check\n"

                file_access_fix()

                {

                l_facout2=""

                l_max="$( printf '%o' $(( 0777 & ~$l_mask)) )"

                if [ $(( $l_mode & $l_mask )) -gt 0 ]; then

                echo -e " - File: \"$l_hdfile\" is mode: \"$l_mode\" and should be mode: \"$l_max\" or more restrictive\n - Changing to mode \"$l_max\""

                chmod "$l_chp" "$l_hdfile"

                fi

                if [[ ! "$l_owner" =~ ($l_user) ]]; then

                echo -e " - File: \"$l_hdfile\" owned by: \"$l_owner\" and should be owned by \"${l_user//|/ or }\"\n - Changing ownership to \"$l_user\""

                chown "$l_user" "$l_hdfile"

                fi

                if [[ ! "$l_gowner" =~ ($l_group) ]]; then

                echo -e " - File: \"$l_hdfile\" group owned by: \"$l_gowner\" and should be group owned by \"${l_group//|/ or }\"\n - Changing group ownership to \"$l_group\""

                chgrp "$l_group" "$l_hdfile"

                fi

                }

                while read -r l_user l_home; do

                if [ -d "$l_home" ]; then

                echo -e "\n - Checking user: \"$l_user\" home directory: \"$l_home\""

                l_group="$(id -gn "$l_user" | xargs)"

                l_group="${l_group// /|}"

                while IFS= read -r -d $'\0' l_hdfile; do

                while read -r l_mode l_owner l_gowner; do

                case "$(basename "$l_hdfile")" in

                .forward | .rhost )

                echo -e " - File: \"$l_hdfile\" exists\n - Please investigate and manually delete \"$l_hdfile\""

                ;;

                .netrc )

                l_mask='0177'

                l_chp="u-x,go-rwx"

                file_access_fix ;;

                .bash_history )

                l_mask='0177'

                l_chp="u-x,go-rwx"

                file_access_fix ;;

                * )

                l_mask='0133'

                l_chp="u-x,go-wx"

                file_access_fix ;;

                esac

                done <<< "$(stat -Lc '%#a %U %G' "$l_hdfile")"

                done < <(find "$l_home" -xdev -type f -name '.*' -print0)

                fi

                done <<< "$(printf '%s\n' "${a_uarr[@]}")"

                unset a_uarr # Remove array

                }

                Show Assessment Evidence
                Complex Check
                AND
                Script: sce/nix_user_dot_files_access_chk.sh
                Result: Fail
                Exit Value: 102
                Output:
                • - Audit Result:
                • ** FAIL **
                • - * Reasons for audit failure * :
                • - User: "admin" Home Directory: "/home/admin"
                • - File: "/home/admin/.bash_profile" owned by: "root" and should be owned by "admin"
                • - File: "/home/admin/.bash_profile" group owned by: "root" and should be group owned by "admin"
                • - * Correctly configured * :
                • - No local interactive users home directories contain:
                • - ".forward" or ".rhost" files
                • - ".netrc" files with incorrect access configured
                • - ".bash_history" files with incorrect access configured
                No error lines were collected.


                Show Rule Result XML
                <xccdf:rule-result xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:notes="http://benchmarks.cisecurity.org/notes"
                                   xmlns:ae="http://benchmarks.cisecurity.org/ae/0.5"
                                   xmlns:ciscf="https://benchmarks.cisecurity.org/ciscf/1.0"
                                   xmlns:cc7="http://cisecurity.org/20-cc/v7.0"
                                   xmlns:cc6="http://cisecurity.org/20-cc/v6.1"
                                   xmlns:ciscat-checklist="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:cc8="http://cisecurity.org/20-cc/v8.0"
                                   xmlns="http://checklists.nist.gov/xccdf/1.2"
                                   xmlns:xhtml="http://www.w3.org/1999/xhtml"
                                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                   xmlns:scap-con="http://scap.nist.gov/schema/scap/constructs/1.2"
                                   xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1"
                                   xmlns:dsc="http://scap.nist.gov/schema/scap/source/1.2"
                                   xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"
                                   idref="xccdf_org.cisecurity.benchmarks_rule_6.2.12_Ensure_local_interactive_user_dot_files_access_is_configured"
                                   role="full"
                                   severity="unknown"
                                   time="2024-04-14T23:46:23.899-04:00"
                                   version="1"
                                   weight="1.0">
                   <xccdf:result>fail</xccdf:result>
                   <xccdf:ident cc7:controlURI="http://cisecurity.org/20-cc/v7.0/control/14/subcontrol/6"
                                system="http://cisecurity.org/20-cc/v7.0"/>
                   <xccdf:ident cc8:controlURI="http://cisecurity.org/20-cc/v8.0/control/3/subcontrol/3"
                                system="http://cisecurity.org/20-cc/v8.0"/>
                   <xccdf:ident system="URL">NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5</xccdf:ident>
                   <xccdf:complex-check operator="AND" negate="false">
                      <xccdf:check system="http://open-scap.org/page/SCE"
                                   negate="false"
                                   multi-check="false">
                         <xccdf:check-content-ref href="sce/nix_user_dot_files_access_chk.sh"/>
                         <xccdf:check-content>
                            <command_result href="sce/nix_user_dot_files_access_chk.sh"
                                            xccdf="fail"
                                            script="/root/Assessor/sce/nix_user_dot_files_access_chk.sh"
                                            exit-value="102">
                               <out>
                                  <l/>
                                  <l/>
                                  <l>- Audit Result:</l>
                                  <l>  ** FAIL **</l>
                                  <l> - * Reasons for audit failure * :</l>
                                  <l/>
                                  <l> - User: "admin" Home Directory: "/home/admin"</l>
                                  <l>  - File: "/home/admin/.bash_profile" owned by: "root" and should be owned by "admin"</l>
                                  <l>  - File: "/home/admin/.bash_profile" group owned by: "root" and should be group owned by "admin"</l>
                                  <l/>
                                  <l/>
                                  <l/>
                                  <l>- * Correctly configured * :</l>
                                  <l>  - No local interactive users home directories contain:</l>
                                  <l>   - ".forward" or ".rhost" files</l>
                                  <l>   - ".netrc" files with incorrect access configured</l>
                                  <l>   - ".bash_history" files with incorrect access configured</l>
                                  <l/>
                               </out>
                               <err/>
                               <env/>
                            </command_result>
                         </xccdf:check-content>
                         <evidence xmlns="http://cisecurity.org/evidence">
                            <div class="sce">
                               <table class="evidence-sep" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td class="bold">Script:</td>
                                        <td>sce/nix_user_dot_files_access_chk.sh</td>
                                     </tr>
                                     <tr>
                                        <td class="bold">Result:</td>
                                        <td class="fail">Fail</td>
                                     </tr>
                                     <tr>
                                        <td class="bold">Exit Value:</td>
                                        <td>102</td>
                                     </tr>
                                  </tbody>
                               </table>
                               <table class="evidence" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td class="bold">Output:</td>
                                        <td>
                                           <ul class="unstyled">
                                              <li/>
                                              <li/>
                                              <li>- Audit Result:</li>
                                              <li>  ** FAIL **</li>
                                              <li> - * Reasons for audit failure * :</li>
                                              <li/>
                                              <li> - User: "admin" Home Directory: "/home/admin"</li>
                                              <li>  - File: "/home/admin/.bash_profile" owned by: "root" and should be owned by "admin"</li>
                                              <li>  - File: "/home/admin/.bash_profile" group owned by: "root" and should be group owned by "admin"</li>
                                              <li/>
                                              <li/>
                                              <li/>
                                              <li>- * Correctly configured * :</li>
                                              <li>  - No local interactive users home directories contain:</li>
                                              <li>   - ".forward" or ".rhost" files</li>
                                              <li>   - ".netrc" files with incorrect access configured</li>
                                              <li>   - ".bash_history" files with incorrect access configured</li>
                                              <li/>
                                           </ul>
                                        </td>
                                     </tr>
                                  </tbody>
                               </table>
                               <table class="evidence" width="100%">
                                  <tbody class="tbe">
                                     <tr>
                                        <td>No error lines were collected.</td>
                                     </tr>
                                  </tbody>
                               </table>
                            </div>
                         </evidence>
                      </xccdf:check>
                   </xccdf:complex-check>
                </xccdf:rule-result>
                

                References:

                • URL: NIST SP 800-53 Rev. 5: CM-1, CM-2, CM-6, CM-7, IA-5

                CIS Controls V7.0:

                • Control 14: Controlled Access Based on the Need to Know: -- More
                  CIS Control Information
                  Control: The processes and tools used to track/control/prevent/correct secure access to critical assets (e.g., information, resources, systems) according to the formal determination of which persons, computers, and applications have a need and right to access these critical assets based on an approved classification.
                  Subcontrol: 14.6
                  Label: Protect Information through Access Control Lists
                  Description: Protect all information stored on systems with file system, network share, claims, application, or database specific access control lists. These controls will enforce the principle that only authorized individuals should have access to the information based on their need to access the information as a part of their responsibilities.
                • >

                CIS Critical Security Controls V8.0:

                • Control 3: Data Protection: -- More
                  CIS Control Information
                  Control: Develop processes and technical controls to identify, classify, securely handle, retain, and dispose of data.
                  Safeguard: 3.3
                  Label: Configure Data Access Control Lists
                  Description: Configure data access control lists based on a user's need to know. Apply data access control lists, also known as access permissions, to local and remote file systems, databases, and applications.
                  Implementation Group: IG-1
                  Security Function: Protect
                • >